<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/hardware/pio.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('rp2__common_2hardware__pio_2include_2hardware_2pio_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">pio.h</div></div>
</div><!--header-->
<div class="contents">
<a href="rp2__common_2hardware__pio_2include_2hardware_2pio_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _HARDWARE_PIO_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _HARDWARE_PIO_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;<a class="code" href="address__mapped_8h.html">hardware/address_mapped.h</a>&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;hardware/structs/pio.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;<a class="code" href="gpio_8h.html">hardware/gpio.h</a>&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &quot;hardware/regs/dreq.h&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &quot;hardware/pio_instructions.h&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_HARDWARE_PIO, Enable/disable assertions in the hardware_pio module, type=bool, default=0, group=hardware_pio</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_PIO</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#ifdef PARAM_ASSERTIONS_ENABLED_PIO </span><span class="comment">// backwards compatibility with SDK &lt; 2.0.0</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_HARDWARE_PIO PARAM_ASSERTIONS_ENABLED_PIO</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_HARDWARE_PIO 0</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">// PICO_CONFIG: PICO_PIO_VERSION, PIO hardware version, type=int, default=0 on RP2040 and 1 on RP2350, group=hardware_pio</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#ifndef PICO_PIO_VERSION</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#if PIO_GPIOBASE_BITS</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#define PICO_PIO_VERSION 1</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#define PICO_PIO_VERSION 0</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment">// PICO_CONFIG: PICO_PIO_CLKDIV_ROUND_NEAREST, True if floating point PIO clock divisors should be rounded to the nearest possible clock divisor rather than rounding down, type=bool, default=PICO_CLKDIV_ROUND_NEAREST, group=hardware_pio</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#ifndef PICO_PIO_CLKDIV_ROUND_NEAREST</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#define PICO_PIO_CLKDIV_ROUND_NEAREST PICO_CLKDIV_ROUND_NEAREST</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="keyword">static_assert</span>(PIO_SM0_SHIFTCTRL_FJOIN_RX_LSB == PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB + 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">  108</a></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">pio_fifo_join</a> {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4">  109</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4">PIO_FIFO_JOIN_NONE</a> = 0,    </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50">  110</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50">PIO_FIFO_JOIN_TX</a> = 1,      </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0">  111</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0">PIO_FIFO_JOIN_RX</a> = 2,      </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    PIO_FIFO_JOIN_TXGET = 4,   </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    PIO_FIFO_JOIN_TXPUT = 8,   </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>    PIO_FIFO_JOIN_PUTGET = 12, </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>};</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga356b3f4974cd31fdc4a2de381aceea5e">  122</a></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__pio.html#ga356b3f4974cd31fdc4a2de381aceea5e">pio_mov_status_type</a> {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>    STATUS_TX_LESSTHAN = 0,</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>    STATUS_RX_LESSTHAN = 1,</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    STATUS_IRQ_SET = 2</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>};</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span><span class="keyword">typedef</span> <a class="code hl_struct" href="structpio__hw__t.html">pio_hw_t</a> *<a class="code hl_struct" href="structpio__hw__t.html">PIO</a>;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">  138</a></span><span class="preprocessor">#define pio0 pio0_hw</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">  146</a></span><span class="preprocessor">#define pio1 pio1_hw</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span> </div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="preprocessor">#if NUM_PIOS &gt; 2</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span><span class="preprocessor">#define pio2 pio2_hw</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span><span class="preprocessor">#ifndef PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span><span class="comment">// PICO_CONFIG: PICO_PIO_USE_GPIO_BASE, Enable code for handling more than 32 PIO pins, type=bool, default=true when supported and when the device has more than 32 pins, group=hardware_pio</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span><span class="preprocessor">#define PICO_PIO_USE_GPIO_BASE ((NUM_BANK0_GPIOS) &gt; 32)</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span><span class="preprocessor">#ifndef PIO_NUM</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span><span class="keyword">static_assert</span>(PIO1_BASE - PIO0_BASE == (1u &lt;&lt; 20), <span class="stringliteral">&quot;hardware layout mismatch&quot;</span>);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga79fcbff988c01df8285f05ce6ad3a86d">  175</a></span><span class="preprocessor">#define PIO_NUM(pio) (((uintptr_t)(pio) - PIO0_BASE) &gt;&gt; 20)</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="preprocessor">#ifndef PIO_INSTANCE</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="keyword">static_assert</span>(PIO1_BASE - PIO0_BASE == (1u &lt;&lt; 20), <span class="stringliteral">&quot;hardware layout mismatch&quot;</span>);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga06134c14db82b7927d96faeb07ab0e8b">  188</a></span><span class="preprocessor">#define PIO_INSTANCE(instance) ((pio_hw_t *)(PIO0_BASE + (instance) * (1u &lt;&lt; 20)))</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span><span class="preprocessor">#ifndef PIO_FUNCSEL_NUM</span></div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">  200</a></span><span class="preprocessor">#define PIO_FUNCSEL_NUM(pio, gpio) ((gpio_function_t) (GPIO_FUNC_PIO0 + PIO_NUM(pio)))</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="preprocessor">#ifndef PIO_DREQ_NUM</span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ac5fedec084064e1d9ff9c6a382c1ccf8">DREQ_PIO0_TX1</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8">DREQ_PIO0_TX0</a> + 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span><span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014aa2e360dbf123d634d08e5fae27aa29e5">DREQ_PIO0_TX2</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8">DREQ_PIO0_TX0</a> + 2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span><span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a156b1b999c6b2dd877545c8c79060a30">DREQ_PIO0_TX3</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8">DREQ_PIO0_TX0</a> + 3, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span><span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ac4bc12d74b758a7b39c1977c401e2fe1">DREQ_PIO0_RX0</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8">DREQ_PIO0_TX0</a> + NUM_PIO_STATE_MACHINES, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span><span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a833bfa99e8b74de9bfc1872958a742e3">DREQ_PIO1_RX0</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a3c22f2c9eb4a49654bba70dbc99bc893">DREQ_PIO1_TX0</a> + NUM_PIO_STATE_MACHINES, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gab9eca729acb2cebdb1abb7793d0f5bdf">  218</a></span><span class="preprocessor">#define PIO_DREQ_NUM(pio, sm, is_tx) ((sm) + (((is_tx) ? 0 : NUM_PIO_STATE_MACHINES) + PIO_NUM(pio) * (DREQ_PIO1_TX0 - DREQ_PIO0_TX0)))</span></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span> </div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span><span class="preprocessor">#ifndef PIO_IRQ_NUM</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaeb939c4541517980acf9de3ae4010624">  230</a></span><span class="preprocessor">#define PIO_IRQ_NUM(pio, irqn) (PIO0_IRQ_0 + NUM_PIO_IRQS * PIO_NUM(pio) + (irqn))</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"><a class="line" href="structpio__sm__config.html">  279</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span>    uint32_t clkdiv;</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span>    uint32_t execctrl;</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span>    uint32_t shiftctrl;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>    uint32_t pinctrl;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span><span class="preprocessor">#define PINHI_ALL_PINCTRL_LSBS ((1u &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB) | (1u &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB) | \</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span><span class="preprocessor">                               (1u &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB) | (1u &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB))</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span><span class="comment">// note we put the out_special pin starting at bit 20</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span><span class="preprocessor">#define PINHI_EXECCTRL_LSB 20</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span><span class="keyword">static_assert</span>( (1u &lt;&lt; PINHI_EXECCTRL_LSB) &gt; (PINHI_ALL_PINCTRL_LSBS * 0x1f), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span><span class="preprocessor">#define PINHI_ALL_PIN_LSBS ((1u &lt;&lt; PINHI_EXECCTRL_LSB) |(1u &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB) | (1u &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB) | \</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span><span class="preprocessor">                               (1u &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB) | (1u &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB))</span></div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span>    <span class="comment">// each 5-bit field which would usually be used for the pin_base in pin_ctrl, is used for:</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>    <span class="comment">// 0b11111 - corresponding field not specified</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span>    <span class="comment">// 0b00000 - pin is in range 0-15</span></div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>    <span class="comment">// 0b00001 - pin is in range 16-31</span></div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>    <span class="comment">// 0b00010 - pin is in range 32-47</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span>    uint32_t pinhi;</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>} <a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a>;</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_sm_param(__unused uint sm) {</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span>    valid_params_if(HARDWARE_PIO, sm &lt; NUM_PIO_STATE_MACHINES);</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno">  303</span>}</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span> </div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_sm_mask(__unused uint mask) {</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span>    valid_params_if(HARDWARE_PIO, mask &lt; (1u &lt;&lt; NUM_PIO_STATE_MACHINES));</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span>}</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span> </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_pio_param(__unused <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio) {</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span><span class="preprocessor">#if NUM_PIOS == 2</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>    valid_params_if(HARDWARE_PIO, pio == <a class="code hl_define" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> || pio == <a class="code hl_define" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a>);</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span><span class="preprocessor">#elif NUM_PIOS == 3</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span>    valid_params_if(HARDWARE_PIO, pio == <a class="code hl_define" href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a> || pio == <a class="code hl_define" href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a> || pio == pio2);</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span>}</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span> </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_pio_pin_param(__unused uint pin) {</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span><span class="preprocessor">#if !PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span>    invalid_params_if(HARDWARE_PIO, pin &gt;= 32);</div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span>    <span class="comment">// pin base allows us to move up 16 pins at a time</span></div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span>    invalid_params_if(HARDWARE_PIO, pin &gt;= ((NUM_BANK0_GPIOS + 15u)&amp;~15u));</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span>}</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span> </div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga1dbca28933c083592e6e359effe250bf">  334</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga1dbca28933c083592e6e359effe250bf">sm_config_set_out_pin_base</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint out_base) {</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno">  335</span>    check_pio_pin_param(out_base);</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_OUT_BASE_BITS) |</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span>                 ((out_base &amp; 31) &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB);</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span>    c-&gt;pinhi = (c-&gt;pinhi &amp; ~(31u &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB)) |</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span>                    ((out_base &gt;&gt; 4) &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB);</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno">  341</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span>}</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno">  343</span> </div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"><a class="line" href="group__sm__config.html#gade3d072e319fc7d10bec180a9692ea89">  352</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gade3d072e319fc7d10bec180a9692ea89">sm_config_set_out_pin_count</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint out_count) {</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span>    valid_params_if(HARDWARE_PIO, out_count &lt;= 32);</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_OUT_COUNT_BITS) |</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno">  355</span>                 (out_count &lt;&lt; PIO_SM0_PINCTRL_OUT_COUNT_LSB);</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span>}</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span> </div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaf3004bbd996443d0c841664ebc92905c">  367</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gaf3004bbd996443d0c841664ebc92905c">sm_config_set_out_pins</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint out_base, uint out_count) {</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span>    <a class="code hl_function" href="group__sm__config.html#ga1dbca28933c083592e6e359effe250bf">sm_config_set_out_pin_base</a>(c, out_base);</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span>    <a class="code hl_function" href="group__sm__config.html#gade3d072e319fc7d10bec180a9692ea89">sm_config_set_out_pin_count</a>(c, out_count);</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno">  370</span>}</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno">  371</span> </div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga40d4807c0665d30ceab153b7444560eb">  380</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga40d4807c0665d30ceab153b7444560eb">sm_config_set_set_pin_base</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint set_base) {</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno">  381</span>    check_pio_pin_param(set_base);</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_SET_BASE_BITS) |</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span>                 ((set_base &amp; 31) &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB);</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>    c-&gt;pinhi = (c-&gt;pinhi &amp; ~(31u &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB)) |</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>                    ((set_base &gt;&gt; 4) &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB);</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span>}</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span> </div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga78e129fe383f2af0fc5e1448dea4c3d6">  398</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga78e129fe383f2af0fc5e1448dea4c3d6">sm_config_set_set_pin_count</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint set_count) {</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span>    valid_params_if(HARDWARE_PIO, set_count &lt;= 5);</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_SET_COUNT_BITS) |</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>                 (set_count &lt;&lt; PIO_SM0_PINCTRL_SET_COUNT_LSB);</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span>}</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span> </div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"><a class="line" href="group__sm__config.html#gada1dff2c00b7d3a1cf722880c8373424">  413</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gada1dff2c00b7d3a1cf722880c8373424">sm_config_set_set_pins</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint set_base, uint set_count) {</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno">  414</span>    <a class="code hl_function" href="group__sm__config.html#ga40d4807c0665d30ceab153b7444560eb">sm_config_set_set_pin_base</a>(c, set_base);</div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno">  415</span>    <a class="code hl_function" href="group__sm__config.html#ga78e129fe383f2af0fc5e1448dea4c3d6">sm_config_set_set_pin_count</a>(c, set_count);</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno">  416</span>}</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span> </div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaaf804a05a2ebaa127d0d216b3d4e3e80">  426</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gaaf804a05a2ebaa127d0d216b3d4e3e80">sm_config_set_in_pin_base</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint in_base) {</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span>    check_pio_pin_param(in_base);</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_IN_BASE_BITS) |</div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span>                 ((in_base &amp; 31) &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB);</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno">  430</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno">  431</span>    c-&gt;pinhi = (c-&gt;pinhi &amp; ~(31u &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB)) |</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>                    ((in_base &gt;&gt; 4) &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB);</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span>}</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno">  435</span> </div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"><a class="line" href="group__sm__config.html#gac418400e30520ea3961d8977c180a4f9">  444</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gac418400e30520ea3961d8977c180a4f9">sm_config_set_in_pins</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint in_base) {</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno">  445</span>    <a class="code hl_function" href="group__sm__config.html#gaaf804a05a2ebaa127d0d216b3d4e3e80">sm_config_set_in_pin_base</a>(c, in_base);</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno">  446</span>}</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span> </div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga441e87022f2178c1c57d509da4aacb75">  461</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga441e87022f2178c1c57d509da4aacb75">sm_config_set_in_pin_count</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint in_count) {</div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno">  462</span><span class="preprocessor">#if PICO_PIO_VERSION == 0</span></div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno">  463</span>    <span class="comment">// can&#39;t be changed from 32 on PIO v0</span></div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span>    ((void)c);</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>    valid_params_if(HARDWARE_PIO, in_count == 32);</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno">  466</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span>    valid_params_if(HARDWARE_PIO, in_count &amp;&amp; in_count &lt;= 32);</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno">  468</span>    c-&gt;shiftctrl = (c-&gt;shiftctrl &amp; ~PIO_SM0_SHIFTCTRL_IN_COUNT_BITS) |</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno">  469</span>                   ((in_count &amp; 0x1fu) &lt;&lt; PIO_SM0_SHIFTCTRL_IN_COUNT_LSB);</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno">  470</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno">  471</span>}</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno">  472</span> </div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga7abfda1f60c62565d5b13536b0605af7">  481</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga7abfda1f60c62565d5b13536b0605af7">sm_config_set_sideset_pin_base</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint sideset_base) {</div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno">  482</span>    check_pio_pin_param(sideset_base);</div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno">  483</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_SIDESET_BASE_BITS) |</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno">  484</span>                 ((sideset_base &amp; 31) &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB);</div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno">  485</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno">  486</span>    c-&gt;pinhi = (c-&gt;pinhi &amp; ~(31u &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB)) |</div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno">  487</span>                    ((sideset_base &gt;&gt; 4) &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB);</div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno">  488</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno">  489</span>}</div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno">  490</span> </div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"><a class="line" href="group__sm__config.html#gad55bf8b410fa1d13bd1bd020587e01d7">  502</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gad55bf8b410fa1d13bd1bd020587e01d7">sm_config_set_sideset_pins</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint sideset_base) {</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno">  503</span>    <a class="code hl_function" href="group__sm__config.html#ga7abfda1f60c62565d5b13536b0605af7">sm_config_set_sideset_pin_base</a>(c, sideset_base);</div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno">  504</span>}</div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno">  505</span> </div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaf543422206a8dbdc2efea85818dd650e">  514</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gaf543422206a8dbdc2efea85818dd650e">sm_config_set_sideset</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint bit_count, <span class="keywordtype">bool</span> optional, <span class="keywordtype">bool</span> pindirs) {</div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno">  515</span>    valid_params_if(HARDWARE_PIO, bit_count &lt;= 5);</div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno">  516</span>    valid_params_if(HARDWARE_PIO, !optional || bit_count &gt;= 1);</div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno">  517</span>    c-&gt;pinctrl = (c-&gt;pinctrl &amp; ~PIO_SM0_PINCTRL_SIDESET_COUNT_BITS) |</div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno">  518</span>                 (bit_count &lt;&lt; PIO_SM0_PINCTRL_SIDESET_COUNT_LSB);</div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno">  519</span>    c-&gt;execctrl = (c-&gt;execctrl &amp; ~(PIO_SM0_EXECCTRL_SIDE_EN_BITS | PIO_SM0_EXECCTRL_SIDE_PINDIR_BITS)) |</div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno">  520</span>                  (bool_to_bit(optional) &lt;&lt; PIO_SM0_EXECCTRL_SIDE_EN_LSB) |</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno">  521</span>                  (bool_to_bit(pindirs) &lt;&lt; PIO_SM0_EXECCTRL_SIDE_PINDIR_LSB);</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno">  522</span>}</div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno">  523</span> </div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">  537</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">sm_config_set_clkdiv_int_frac8</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint32_t div_int, uint8_t div_frac8) {</div>
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno">  538</span>    <span class="keyword">static_assert</span>(REG_FIELD_WIDTH(PIO_SM0_CLKDIV_INT) == 16, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno">  539</span>    invalid_params_if(HARDWARE_PIO, div_int &gt;&gt; 16);</div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno">  540</span>    invalid_params_if(HARDWARE_PIO, div_int == 0 &amp;&amp; div_frac8 != 0);</div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno">  541</span>    <span class="keyword">static_assert</span>(REG_FIELD_WIDTH(PIO_SM0_CLKDIV_FRAC) == 8, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno">  542</span>    c-&gt;clkdiv =</div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno">  543</span>            (((uint)div_frac8) &lt;&lt; PIO_SM0_CLKDIV_FRAC_LSB) |</div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno">  544</span>            (((uint)div_int) &lt;&lt; PIO_SM0_CLKDIV_INT_LSB);</div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno">  545</span>}</div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno">  546</span> </div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno">  547</span><span class="comment">// backwards compatibility</span></div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno">  548</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> sm_config_set_clkdiv_int_frac(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint16_t div_int, uint8_t div_frac8) {</div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno">  549</span>    <a class="code hl_function" href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">sm_config_set_clkdiv_int_frac8</a>(c, div_int, div_frac8);</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno">  550</span>}</div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno">  551</span> </div>
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno">  552</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_calculate_clkdiv8_from_float(<span class="keywordtype">float</span> div, uint32_t *div_int, uint8_t *div_frac8) {</div>
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno">  553</span>    valid_params_if(HARDWARE_PIO, div &gt;= 1 &amp;&amp; div &lt;= 65536);</div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno">  554</span>    <span class="keyword">const</span> <span class="keywordtype">int</span> frac_bit_count = REG_FIELD_WIDTH(PIO_SM0_CLKDIV_FRAC);</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno">  555</span><span class="preprocessor">#if PICO_PIO_CLKDIV_ROUND_NEAREST</span></div>
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno">  556</span>    div += 0.5f / (1 &lt;&lt; frac_bit_count); <span class="comment">// round to the nearest 1/256</span></div>
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno">  557</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno">  558</span>    *div_int = (uint16_t)div;</div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno">  559</span>    <span class="comment">// not a strictly necessary check, but if this changes, then this method should</span></div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno">  560</span>    <span class="comment">// probably no longer be used in favor of one with a larger fraction</span></div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno">  561</span>    <span class="keyword">static_assert</span>(REG_FIELD_WIDTH(PIO_SM0_CLKDIV_FRAC) == 8, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno">  562</span>    <span class="keywordflow">if</span> (*div_int == 0) {</div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno">  563</span>        *div_frac8 = 0;</div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno">  564</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>        *div_frac8 = (uint8_t)((div - (<span class="keywordtype">float</span>)*div_int) * (1u &lt;&lt; frac_bit_count));</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno">  566</span>    }</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno">  567</span>}</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno">  568</span> </div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno">  569</span><span class="comment">// backwards compatibility</span></div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno">  570</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_calculate_clkdiv_from_float(<span class="keywordtype">float</span> div, uint16_t *div_int16, uint8_t *div_frac8) {</div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno">  571</span>    uint32_t div_int;</div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno">  572</span>    pio_calculate_clkdiv8_from_float(div, &amp;div_int, div_frac8);</div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno">  573</span>    *div_int16 = (uint16_t) div_int;</div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno">  574</span>}</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno">  575</span> </div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"><a class="line" href="group__sm__config.html#gae8c09c7a4372da95ad777faae51c5a24">  591</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gae8c09c7a4372da95ad777faae51c5a24">sm_config_set_clkdiv</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keywordtype">float</span> div) {</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno">  592</span>    uint32_t div_int;</div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno">  593</span>    uint8_t div_frac8;</div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno">  594</span>    pio_calculate_clkdiv8_from_float(div, &amp;div_int, &amp;div_frac8);</div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno">  595</span>    <a class="code hl_function" href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">sm_config_set_clkdiv_int_frac8</a>(c, div_int, div_frac8);</div>
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno">  596</span>}</div>
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno">  597</span> </div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"><a class="line" href="group__sm__config.html#gafb753e8b35bbea9209ca4399a845f89c">  606</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gafb753e8b35bbea9209ca4399a845f89c">sm_config_set_wrap</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint wrap_target, uint wrap) {</div>
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno">  607</span>    valid_params_if(HARDWARE_PIO, wrap &lt; PIO_INSTRUCTION_COUNT);</div>
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno">  608</span>    valid_params_if(HARDWARE_PIO, wrap_target &lt; PIO_INSTRUCTION_COUNT);</div>
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno">  609</span>    c-&gt;execctrl = (c-&gt;execctrl &amp; ~(PIO_SM0_EXECCTRL_WRAP_TOP_BITS | PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS)) |</div>
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno">  610</span>                  (wrap_target &lt;&lt; PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB) |</div>
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno">  611</span>                  (wrap &lt;&lt; PIO_SM0_EXECCTRL_WRAP_TOP_LSB);</div>
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno">  612</span>}</div>
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno">  613</span> </div>
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaf2bfc66d6427ff92519e38dcb611133b">  620</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gaf2bfc66d6427ff92519e38dcb611133b">sm_config_set_jmp_pin</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, uint pin) {</div>
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno">  621</span>    check_pio_pin_param(pin);</div>
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno">  622</span>    c-&gt;execctrl = (c-&gt;execctrl &amp; ~PIO_SM0_EXECCTRL_JMP_PIN_BITS) |</div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno">  623</span>                  ((pin &amp; 31) &lt;&lt; PIO_SM0_EXECCTRL_JMP_PIN_LSB);</div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno">  624</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno">  625</span>    c-&gt;pinhi = (c-&gt;pinhi &amp; ~(31u &lt;&lt; 20)) |</div>
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno">  626</span>               ((pin &gt;&gt; 4) &lt;&lt; 20);</div>
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno">  627</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno">  628</span>}</div>
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno">  629</span> </div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaed7a6e7dc4f1979c7c62e4773df8c79b">  638</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gaed7a6e7dc4f1979c7c62e4773df8c79b">sm_config_set_in_shift</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keywordtype">bool</span> shift_right, <span class="keywordtype">bool</span> autopush, uint push_threshold) {</div>
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno">  639</span>    valid_params_if(HARDWARE_PIO, push_threshold &lt;= 32);</div>
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno">  640</span>    c-&gt;shiftctrl = (c-&gt;shiftctrl &amp;</div>
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno">  641</span>                    ~(PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_BITS |</div>
<div class="line"><a id="l00642" name="l00642"></a><span class="lineno">  642</span>                      PIO_SM0_SHIFTCTRL_AUTOPUSH_BITS |</div>
<div class="line"><a id="l00643" name="l00643"></a><span class="lineno">  643</span>                      PIO_SM0_SHIFTCTRL_PUSH_THRESH_BITS)) |</div>
<div class="line"><a id="l00644" name="l00644"></a><span class="lineno">  644</span>                   (bool_to_bit(shift_right) &lt;&lt; PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_LSB) |</div>
<div class="line"><a id="l00645" name="l00645"></a><span class="lineno">  645</span>                   (bool_to_bit(autopush) &lt;&lt; PIO_SM0_SHIFTCTRL_AUTOPUSH_LSB) |</div>
<div class="line"><a id="l00646" name="l00646"></a><span class="lineno">  646</span>                   ((push_threshold &amp; 0x1fu) &lt;&lt; PIO_SM0_SHIFTCTRL_PUSH_THRESH_LSB);</div>
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno">  647</span>}</div>
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno">  648</span> </div>
<div class="line"><a id="l00657" name="l00657"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga613bed03e10e569f1b7aede74d40a5b5">  657</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga613bed03e10e569f1b7aede74d40a5b5">sm_config_set_out_shift</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keywordtype">bool</span> shift_right, <span class="keywordtype">bool</span> autopull, uint pull_threshold) {</div>
<div class="line"><a id="l00658" name="l00658"></a><span class="lineno">  658</span>    valid_params_if(HARDWARE_PIO, pull_threshold &lt;= 32);</div>
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno">  659</span>    c-&gt;shiftctrl = (c-&gt;shiftctrl &amp;</div>
<div class="line"><a id="l00660" name="l00660"></a><span class="lineno">  660</span>                    ~(PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_BITS |</div>
<div class="line"><a id="l00661" name="l00661"></a><span class="lineno">  661</span>                      PIO_SM0_SHIFTCTRL_AUTOPULL_BITS |</div>
<div class="line"><a id="l00662" name="l00662"></a><span class="lineno">  662</span>                      PIO_SM0_SHIFTCTRL_PULL_THRESH_BITS)) |</div>
<div class="line"><a id="l00663" name="l00663"></a><span class="lineno">  663</span>                   (bool_to_bit(shift_right) &lt;&lt; PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_LSB) |</div>
<div class="line"><a id="l00664" name="l00664"></a><span class="lineno">  664</span>                   (bool_to_bit(autopull) &lt;&lt; PIO_SM0_SHIFTCTRL_AUTOPULL_LSB) |</div>
<div class="line"><a id="l00665" name="l00665"></a><span class="lineno">  665</span>                   ((pull_threshold &amp; 0x1fu) &lt;&lt; PIO_SM0_SHIFTCTRL_PULL_THRESH_LSB);</div>
<div class="line"><a id="l00666" name="l00666"></a><span class="lineno">  666</span>}</div>
<div class="line"><a id="l00667" name="l00667"></a><span class="lineno">  667</span> </div>
<div class="line"><a id="l00674" name="l00674"></a><span class="lineno"><a class="line" href="group__sm__config.html#gafea1a06362182514518ebd91b2d52fd5">  674</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gafea1a06362182514518ebd91b2d52fd5">sm_config_set_fifo_join</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">pio_fifo_join</a> join) {</div>
<div class="line"><a id="l00675" name="l00675"></a><span class="lineno">  675</span>    valid_params_if(HARDWARE_PIO, join == <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4">PIO_FIFO_JOIN_NONE</a> || join == <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50">PIO_FIFO_JOIN_TX</a> || join == <a class="code hl_enumvalue" href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0">PIO_FIFO_JOIN_RX</a></div>
<div class="line"><a id="l00676" name="l00676"></a><span class="lineno">  676</span>#<span class="keywordflow">if</span> PICO_PIO_VERSION &gt; 0</div>
<div class="line"><a id="l00677" name="l00677"></a><span class="lineno">  677</span>        || join == PIO_FIFO_JOIN_TXPUT || join == PIO_FIFO_JOIN_TXGET || join == PIO_FIFO_JOIN_PUTGET</div>
<div class="line"><a id="l00678" name="l00678"></a><span class="lineno">  678</span>#endif</div>
<div class="line"><a id="l00679" name="l00679"></a><span class="lineno">  679</span>    );</div>
<div class="line"><a id="l00680" name="l00680"></a><span class="lineno">  680</span><span class="preprocessor">#if PICO_PIO_VERSION == 0</span></div>
<div class="line"><a id="l00681" name="l00681"></a><span class="lineno">  681</span>    c-&gt;shiftctrl = (c-&gt;shiftctrl &amp; (uint)~(PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS)) |</div>
<div class="line"><a id="l00682" name="l00682"></a><span class="lineno">  682</span>                   (((uint)join) &lt;&lt; PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB);</div>
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno">  683</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno">  684</span>    c-&gt;shiftctrl = (c-&gt;shiftctrl &amp; (uint)~(PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS |</div>
<div class="line"><a id="l00685" name="l00685"></a><span class="lineno">  685</span>                                           PIO_SM0_SHIFTCTRL_FJOIN_RX_PUT_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_GET_BITS)) |</div>
<div class="line"><a id="l00686" name="l00686"></a><span class="lineno">  686</span>                   (((uint)(join &amp; 3)) &lt;&lt; PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB) |</div>
<div class="line"><a id="l00687" name="l00687"></a><span class="lineno">  687</span>                   (((uint)(join &gt;&gt; 2)) &lt;&lt; PIO_SM0_SHIFTCTRL_FJOIN_RX_GET_LSB);</div>
<div class="line"><a id="l00688" name="l00688"></a><span class="lineno">  688</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00689" name="l00689"></a><span class="lineno">  689</span>}</div>
<div class="line"><a id="l00690" name="l00690"></a><span class="lineno">  690</span> </div>
<div class="line"><a id="l00699" name="l00699"></a><span class="lineno"><a class="line" href="group__sm__config.html#ga20366467e0cddab87a797459a53880e9">  699</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#ga20366467e0cddab87a797459a53880e9">sm_config_set_out_special</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keywordtype">bool</span> sticky, <span class="keywordtype">bool</span> has_enable_pin, uint enable_bit_index) {</div>
<div class="line"><a id="l00700" name="l00700"></a><span class="lineno">  700</span>    c-&gt;execctrl = (c-&gt;execctrl &amp;</div>
<div class="line"><a id="l00701" name="l00701"></a><span class="lineno">  701</span>                   (uint)~(PIO_SM0_EXECCTRL_OUT_STICKY_BITS | PIO_SM0_EXECCTRL_INLINE_OUT_EN_BITS |</div>
<div class="line"><a id="l00702" name="l00702"></a><span class="lineno">  702</span>                     PIO_SM0_EXECCTRL_OUT_EN_SEL_BITS)) |</div>
<div class="line"><a id="l00703" name="l00703"></a><span class="lineno">  703</span>                  (bool_to_bit(sticky) &lt;&lt; PIO_SM0_EXECCTRL_OUT_STICKY_LSB) |</div>
<div class="line"><a id="l00704" name="l00704"></a><span class="lineno">  704</span>                  (bool_to_bit(has_enable_pin) &lt;&lt; PIO_SM0_EXECCTRL_INLINE_OUT_EN_LSB) |</div>
<div class="line"><a id="l00705" name="l00705"></a><span class="lineno">  705</span>                  ((enable_bit_index &lt;&lt; PIO_SM0_EXECCTRL_OUT_EN_SEL_LSB) &amp; PIO_SM0_EXECCTRL_OUT_EN_SEL_BITS);</div>
<div class="line"><a id="l00706" name="l00706"></a><span class="lineno">  706</span>}</div>
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno">  707</span> </div>
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno"><a class="line" href="group__sm__config.html#gacd24870944ce2f00f3f7847bb3e5d543">  715</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__sm__config.html#gacd24870944ce2f00f3f7847bb3e5d543">sm_config_set_mov_status</a>(<a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *c, <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__pio.html#ga356b3f4974cd31fdc4a2de381aceea5e">pio_mov_status_type</a> status_sel, uint status_n) {</div>
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno">  716</span>    valid_params_if(HARDWARE_PIO,</div>
<div class="line"><a id="l00717" name="l00717"></a><span class="lineno">  717</span>                    status_sel == STATUS_TX_LESSTHAN || status_sel == STATUS_RX_LESSTHAN</div>
<div class="line"><a id="l00718" name="l00718"></a><span class="lineno">  718</span>#<span class="keywordflow">if</span> PICO_PIO_VERSION &gt; 0</div>
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno">  719</span>                    || status_sel == STATUS_IRQ_SET</div>
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno">  720</span>#endif</div>
<div class="line"><a id="l00721" name="l00721"></a><span class="lineno">  721</span>    );</div>
<div class="line"><a id="l00722" name="l00722"></a><span class="lineno">  722</span>    c-&gt;execctrl = (c-&gt;execctrl</div>
<div class="line"><a id="l00723" name="l00723"></a><span class="lineno">  723</span>                  &amp; ~(PIO_SM0_EXECCTRL_STATUS_SEL_BITS | PIO_SM0_EXECCTRL_STATUS_N_BITS))</div>
<div class="line"><a id="l00724" name="l00724"></a><span class="lineno">  724</span>                  | ((((uint)status_sel) &lt;&lt; PIO_SM0_EXECCTRL_STATUS_SEL_LSB) &amp; PIO_SM0_EXECCTRL_STATUS_SEL_BITS)</div>
<div class="line"><a id="l00725" name="l00725"></a><span class="lineno">  725</span>                  | ((status_n &lt;&lt; PIO_SM0_EXECCTRL_STATUS_N_LSB) &amp; PIO_SM0_EXECCTRL_STATUS_N_BITS);</div>
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno">  726</span>}</div>
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno">  727</span> </div>
<div class="line"><a id="l00747" name="l00747"></a><span class="lineno"><a class="line" href="group__sm__config.html#gaf2d2a23b08ba74188160469b3fd09936">  747</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> <a class="code hl_function" href="group__sm__config.html#gaf2d2a23b08ba74188160469b3fd09936">pio_get_default_sm_config</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a id="l00748" name="l00748"></a><span class="lineno">  748</span>    <a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> c = {};</div>
<div class="line"><a id="l00749" name="l00749"></a><span class="lineno">  749</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00750" name="l00750"></a><span class="lineno">  750</span>    c.pinhi = -1;</div>
<div class="line"><a id="l00751" name="l00751"></a><span class="lineno">  751</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00752" name="l00752"></a><span class="lineno">  752</span>    <a class="code hl_function" href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">sm_config_set_clkdiv_int_frac8</a>(&amp;c, 1, 0);</div>
<div class="line"><a id="l00753" name="l00753"></a><span class="lineno">  753</span>    <a class="code hl_function" href="group__sm__config.html#gafb753e8b35bbea9209ca4399a845f89c">sm_config_set_wrap</a>(&amp;c, 0, 31);</div>
<div class="line"><a id="l00754" name="l00754"></a><span class="lineno">  754</span>    <a class="code hl_function" href="group__sm__config.html#gaed7a6e7dc4f1979c7c62e4773df8c79b">sm_config_set_in_shift</a>(&amp;c, <span class="keyword">true</span>, <span class="keyword">false</span>, 32);</div>
<div class="line"><a id="l00755" name="l00755"></a><span class="lineno">  755</span>    <a class="code hl_function" href="group__sm__config.html#ga613bed03e10e569f1b7aede74d40a5b5">sm_config_set_out_shift</a>(&amp;c, <span class="keyword">true</span>, <span class="keyword">false</span>, 32);</div>
<div class="line"><a id="l00756" name="l00756"></a><span class="lineno">  756</span>    <span class="keywordflow">return</span> c;</div>
<div class="line"><a id="l00757" name="l00757"></a><span class="lineno">  757</span>}</div>
<div class="line"><a id="l00758" name="l00758"></a><span class="lineno">  758</span> </div>
<div class="line"><a id="l00769" name="l00769"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">  769</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio) {</div>
<div class="line"><a id="l00770" name="l00770"></a><span class="lineno">  770</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l00771" name="l00771"></a><span class="lineno">  771</span>    <span class="keywordflow">return</span> pio-&gt;gpiobase;</div>
<div class="line"><a id="l00772" name="l00772"></a><span class="lineno">  772</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00773" name="l00773"></a><span class="lineno">  773</span>    ((void)pio);</div>
<div class="line"><a id="l00774" name="l00774"></a><span class="lineno">  774</span>    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00775" name="l00775"></a><span class="lineno">  775</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00776" name="l00776"></a><span class="lineno">  776</span>}</div>
<div class="line"><a id="l00777" name="l00777"></a><span class="lineno">  777</span> </div>
<div class="line"><a id="l00778" name="l00778"></a><span class="lineno">  778</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_pio_pin_mask64(__unused <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, __unused uint sm, __unused uint64_t pinmask) {</div>
<div class="line"><a id="l00779" name="l00779"></a><span class="lineno">  779</span>    <span class="comment">// check no pins are set in the mask which are incompatible with the pio</span></div>
<div class="line"><a id="l00780" name="l00780"></a><span class="lineno">  780</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno">  781</span>    valid_params_if(HARDWARE_PIO, (pinmask &amp; ~(0xffffffffull &lt;&lt; <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio))) == 0);</div>
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno">  782</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00783" name="l00783"></a><span class="lineno">  783</span>    valid_params_if(HARDWARE_PIO, (pinmask &amp; ~0xffffffffull) == 0);</div>
<div class="line"><a id="l00784" name="l00784"></a><span class="lineno">  784</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00785" name="l00785"></a><span class="lineno">  785</span>}</div>
<div class="line"><a id="l00786" name="l00786"></a><span class="lineno">  786</span> </div>
<div class="line"><a id="l00798" name="l00798"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga28e9a84f3332ebf088f665d4b676117b">  798</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#ga28e9a84f3332ebf088f665d4b676117b">pio_sm_set_config</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *config) {</div>
<div class="line"><a id="l00799" name="l00799"></a><span class="lineno">  799</span>    check_pio_param(pio);</div>
<div class="line"><a id="l00800" name="l00800"></a><span class="lineno">  800</span>    check_sm_param(sm);</div>
<div class="line"><a id="l00801" name="l00801"></a><span class="lineno">  801</span>    pio-&gt;sm[sm].clkdiv = config-&gt;clkdiv;</div>
<div class="line"><a id="l00802" name="l00802"></a><span class="lineno">  802</span>    pio-&gt;sm[sm].shiftctrl = config-&gt;shiftctrl;</div>
<div class="line"><a id="l00803" name="l00803"></a><span class="lineno">  803</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l00804" name="l00804"></a><span class="lineno">  804</span>    uint used = (~config-&gt;pinhi &gt;&gt; 4) &amp; PINHI_ALL_PIN_LSBS;</div>
<div class="line"><a id="l00805" name="l00805"></a><span class="lineno">  805</span>    <span class="comment">// configs that use pins 0-15</span></div>
<div class="line"><a id="l00806" name="l00806"></a><span class="lineno">  806</span>    uint gpio_under_16 = (~config-&gt;pinhi) &amp; (~config-&gt;pinhi &gt;&gt; 1) &amp; used;</div>
<div class="line"><a id="l00807" name="l00807"></a><span class="lineno">  807</span>    <span class="comment">// configs that use pins 32-47</span></div>
<div class="line"><a id="l00808" name="l00808"></a><span class="lineno">  808</span>    uint gpio_over_32 = (config-&gt;pinhi &gt;&gt; 1) &amp; used;</div>
<div class="line"><a id="l00809" name="l00809"></a><span class="lineno">  809</span>    uint gpio_base = <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l00810" name="l00810"></a><span class="lineno">  810</span>    invalid_params_if_and_return(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a>, gpio_under_16 &amp;&amp; gpio_base, <a class="code hl_enumvalue" href="group__pico__base.html#ggaddcb20bc9a61ceff479aa87369a862aaac86a6335326022a1ff4d1cd8aad4bb69">PICO_ERROR_BAD_ALIGNMENT</a>);</div>
<div class="line"><a id="l00811" name="l00811"></a><span class="lineno">  811</span>    invalid_params_if_and_return(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a>, gpio_over_32 &amp;&amp; !gpio_base, <a class="code hl_enumvalue" href="group__pico__base.html#ggaddcb20bc9a61ceff479aa87369a862aaac86a6335326022a1ff4d1cd8aad4bb69">PICO_ERROR_BAD_ALIGNMENT</a>);</div>
<div class="line"><a id="l00812" name="l00812"></a><span class="lineno">  812</span>    <span class="comment">// flip the top bit of any used (execctrl/pinctrl) values to turn:</span></div>
<div class="line"><a id="l00813" name="l00813"></a><span class="lineno">  813</span>    <span class="comment">// bit6(32) + 0-15  -&gt; base(16) + 16-31</span></div>
<div class="line"><a id="l00814" name="l00814"></a><span class="lineno">  814</span>    <span class="comment">// bit6(0)  + 16-31 -&gt; base(16) + 0-15</span></div>
<div class="line"><a id="l00815" name="l00815"></a><span class="lineno">  815</span>    <span class="keyword">static_assert</span>(PINHI_EXECCTRL_LSB == 20, <span class="stringliteral">&quot;&quot;</span>); <span class="comment">// we use shifts to mask off bits below</span></div>
<div class="line"><a id="l00816" name="l00816"></a><span class="lineno">  816</span>    pio-&gt;sm[sm].execctrl = config-&gt;execctrl ^ (gpio_base ? ((used &gt;&gt; 20) &lt;&lt; (PIO_SM0_EXECCTRL_JMP_PIN_LSB + 4)) : 0);</div>
<div class="line"><a id="l00817" name="l00817"></a><span class="lineno">  817</span>    pio-&gt;sm[sm].pinctrl = config-&gt;pinctrl ^ (gpio_base ? ((used &lt;&lt; 12) &gt;&gt; 8) : 0);</div>
<div class="line"><a id="l00818" name="l00818"></a><span class="lineno">  818</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00819" name="l00819"></a><span class="lineno">  819</span>    pio-&gt;sm[sm].execctrl = config-&gt;execctrl;</div>
<div class="line"><a id="l00820" name="l00820"></a><span class="lineno">  820</span>    pio-&gt;sm[sm].pinctrl = config-&gt;pinctrl;</div>
<div class="line"><a id="l00821" name="l00821"></a><span class="lineno">  821</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00822" name="l00822"></a><span class="lineno">  822</span>    <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="group__pico__base.html#ggaddcb20bc9a61ceff479aa87369a862aaa9b50bcb755cf2e8295de9ffa52b252fd">PICO_OK</a>;</div>
<div class="line"><a id="l00823" name="l00823"></a><span class="lineno">  823</span>}</div>
<div class="line"><a id="l00824" name="l00824"></a><span class="lineno">  824</span> </div>
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gae86f691914b78d66b1394ae94f3f4aa6">  831</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#gae86f691914b78d66b1394ae94f3f4aa6">pio_get_index</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio) {</div>
<div class="line"><a id="l00832" name="l00832"></a><span class="lineno">  832</span>    check_pio_param(pio);</div>
<div class="line"><a id="l00833" name="l00833"></a><span class="lineno">  833</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__pio.html#ga79fcbff988c01df8285f05ce6ad3a86d">PIO_NUM</a>(pio);</div>
<div class="line"><a id="l00834" name="l00834"></a><span class="lineno">  834</span>}</div>
<div class="line"><a id="l00835" name="l00835"></a><span class="lineno">  835</span> </div>
<div class="line"><a id="l00843" name="l00843"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga9e150bfd3d43565a01f38a37fa2884d4">  843</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#ga9e150bfd3d43565a01f38a37fa2884d4">pio_get_funcsel</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio) {</div>
<div class="line"><a id="l00844" name="l00844"></a><span class="lineno">  844</span>    check_pio_param(pio);</div>
<div class="line"><a id="l00845" name="l00845"></a><span class="lineno">  845</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">PIO_FUNCSEL_NUM</a>(pio, 0); <span class="comment">// note GPIO currently unused, so won&#39;t bother updating API</span></div>
<div class="line"><a id="l00846" name="l00846"></a><span class="lineno">  846</span>}</div>
<div class="line"><a id="l00847" name="l00847"></a><span class="lineno">  847</span> </div>
<div class="line"><a id="l00854" name="l00854"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga151f87205041da11d3c69be5ddbd5653">  854</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> <a class="code hl_function" href="group__hardware__pio.html#ga151f87205041da11d3c69be5ddbd5653">pio_get_instance</a>(uint instance) {</div>
<div class="line"><a id="l00855" name="l00855"></a><span class="lineno">  855</span>    invalid_params_if(HARDWARE_PIO, instance &gt;= NUM_PIOS);</div>
<div class="line"><a id="l00856" name="l00856"></a><span class="lineno">  856</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__pio.html#ga06134c14db82b7927d96faeb07ab0e8b">PIO_INSTANCE</a>(instance);</div>
<div class="line"><a id="l00857" name="l00857"></a><span class="lineno">  857</span>}</div>
<div class="line"><a id="l00858" name="l00858"></a><span class="lineno">  858</span> </div>
<div class="line"><a id="l00871" name="l00871"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gafa244b1be8f53a329db9d26298e054bb">  871</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gafa244b1be8f53a329db9d26298e054bb">pio_gpio_init</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint pin) {</div>
<div class="line"><a id="l00872" name="l00872"></a><span class="lineno">  872</span>    check_pio_param(pio);</div>
<div class="line"><a id="l00873" name="l00873"></a><span class="lineno">  873</span>    valid_params_if(HARDWARE_PIO, pin &lt; NUM_BANK0_GPIOS);</div>
<div class="line"><a id="l00874" name="l00874"></a><span class="lineno">  874</span>    <a class="code hl_function" href="group__hardware__gpio.html#ga22f6b90c4c7e0013b4b5341de0a44fc4">gpio_set_function</a>(pin, <a class="code hl_define" href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">PIO_FUNCSEL_NUM</a>(pio, pin));</div>
<div class="line"><a id="l00875" name="l00875"></a><span class="lineno">  875</span>}</div>
<div class="line"><a id="l00876" name="l00876"></a><span class="lineno">  876</span> </div>
<div class="line"><a id="l00884" name="l00884"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga4091eef7afda5200a3988b9412fe3b3f">  884</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#ga4091eef7afda5200a3988b9412fe3b3f">pio_get_dreq</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, <span class="keywordtype">bool</span> is_tx) {</div>
<div class="line"><a id="l00885" name="l00885"></a><span class="lineno">  885</span>    check_pio_param(pio);</div>
<div class="line"><a id="l00886" name="l00886"></a><span class="lineno">  886</span>    check_sm_param(sm);</div>
<div class="line"><a id="l00887" name="l00887"></a><span class="lineno">  887</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__pio.html#gab9eca729acb2cebdb1abb7793d0f5bdf">PIO_DREQ_NUM</a>(pio, sm, is_tx);</div>
<div class="line"><a id="l00888" name="l00888"></a><span class="lineno">  888</span>}</div>
<div class="line"><a id="l00889" name="l00889"></a><span class="lineno">  889</span> </div>
<div class="line"><a id="l00890" name="l00890"></a><span class="lineno"><a class="line" href="structpio__program.html">  890</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structpio__program.html">pio_program</a> {</div>
<div class="line"><a id="l00891" name="l00891"></a><span class="lineno">  891</span>    <span class="keyword">const</span> uint16_t *instructions;</div>
<div class="line"><a id="l00892" name="l00892"></a><span class="lineno">  892</span>    uint8_t length;</div>
<div class="line"><a id="l00893" name="l00893"></a><span class="lineno">  893</span>    int8_t origin; <span class="comment">// required instruction memory origin or -1</span></div>
<div class="line"><a id="l00894" name="l00894"></a><span class="lineno">  894</span>    uint8_t pio_version;</div>
<div class="line"><a id="l00895" name="l00895"></a><span class="lineno">  895</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l00896" name="l00896"></a><span class="lineno">  896</span>    uint8_t used_gpio_ranges; <span class="comment">// bitmap with one bit per 16 pins</span></div>
<div class="line"><a id="l00897" name="l00897"></a><span class="lineno">  897</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00898" name="l00898"></a><span class="lineno">  898</span>} <a class="code hl_struct" href="structpio__program.html">pio_program_t</a>;</div>
<div class="line"><a id="l00899" name="l00899"></a><span class="lineno">  899</span> </div>
<div class="line"><a id="l00914" name="l00914"></a><span class="lineno">  914</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#ga332210f0e594b24bf64f4bb1c8f49be3">pio_set_gpio_base</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint gpio_base);</div>
<div class="line"><a id="l00915" name="l00915"></a><span class="lineno">  915</span> </div>
<div class="line"><a id="l00924" name="l00924"></a><span class="lineno">  924</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gaa8aafe966a46f4de9be59f73cae65a4b">pio_can_add_program</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program);</div>
<div class="line"><a id="l00925" name="l00925"></a><span class="lineno">  925</span> </div>
<div class="line"><a id="l00935" name="l00935"></a><span class="lineno">  935</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gaafac789d94b0727bb02ea83a8786897f">pio_can_add_program_at_offset</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, uint offset);</div>
<div class="line"><a id="l00936" name="l00936"></a><span class="lineno">  936</span> </div>
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno">  947</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#gaefbd086e8e96fee073438dac3c20334c">pio_add_program</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program);</div>
<div class="line"><a id="l00948" name="l00948"></a><span class="lineno">  948</span> </div>
<div class="line"><a id="l00960" name="l00960"></a><span class="lineno">  960</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#ga12948478935f817218b64e1db3a8ebad">pio_add_program_at_offset</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, uint offset);</div>
<div class="line"><a id="l00961" name="l00961"></a><span class="lineno">  961</span> </div>
<div class="line"><a id="l00969" name="l00969"></a><span class="lineno">  969</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga81c77d31aff72655977b658a9c37665e">pio_remove_program</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, uint loaded_offset);</div>
<div class="line"><a id="l00970" name="l00970"></a><span class="lineno">  970</span> </div>
<div class="line"><a id="l00976" name="l00976"></a><span class="lineno">  976</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga850396a2a2925bbcc97247a629ca5bd2">pio_clear_instruction_memory</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio);</div>
<div class="line"><a id="l00977" name="l00977"></a><span class="lineno">  977</span> </div>
<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"> 1000</span><span class="keywordtype">int</span> pio_sm_init(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint initial_pc, <span class="keyword">const</span> <a class="code hl_struct" href="structpio__sm__config.html">pio_sm_config</a> *config);</div>
<div class="line"><a id="l01001" name="l01001"></a><span class="lineno"> 1001</span> </div>
<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaa47ec4090dcdc251e44bf4e4cb89a7bc"> 1009</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaa47ec4090dcdc251e44bf4e4cb89a7bc">pio_sm_set_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01010" name="l01010"></a><span class="lineno"> 1010</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01011" name="l01011"></a><span class="lineno"> 1011</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01012" name="l01012"></a><span class="lineno"> 1012</span>    pio-&gt;ctrl = (pio-&gt;ctrl &amp; ~(1u &lt;&lt; sm)) | (bool_to_bit(enabled) &lt;&lt; sm);</div>
<div class="line"><a id="l01013" name="l01013"></a><span class="lineno"> 1013</span>}</div>
<div class="line"><a id="l01014" name="l01014"></a><span class="lineno"> 1014</span> </div>
<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935"> 1028</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935">pio_set_sm_mask_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01029" name="l01029"></a><span class="lineno"> 1029</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01030" name="l01030"></a><span class="lineno"> 1030</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span>    pio-&gt;ctrl = (pio-&gt;ctrl &amp; ~mask) | (enabled ? mask : 0u);</div>
<div class="line"><a id="l01032" name="l01032"></a><span class="lineno"> 1032</span>}</div>
<div class="line"><a id="l01033" name="l01033"></a><span class="lineno"> 1033</span> </div>
<div class="line"><a id="l01034" name="l01034"></a><span class="lineno"> 1034</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l01050" name="l01050"></a><span class="lineno"> 1050</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_set_sm_multi_mask_enabled(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask_prev, uint32_t mask, uint32_t mask_next, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01051" name="l01051"></a><span class="lineno"> 1051</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01053" name="l01053"></a><span class="lineno"> 1053</span>    pio-&gt;ctrl = (pio-&gt;ctrl &amp; ~(mask &lt;&lt; PIO_CTRL_SM_ENABLE_LSB)) |</div>
<div class="line"><a id="l01054" name="l01054"></a><span class="lineno"> 1054</span>                (enabled ? ((mask &lt;&lt; PIO_CTRL_SM_ENABLE_LSB) &amp; PIO_CTRL_SM_ENABLE_BITS) : 0) |</div>
<div class="line"><a id="l01055" name="l01055"></a><span class="lineno"> 1055</span>                (enabled ? PIO_CTRL_NEXTPREV_SM_ENABLE_BITS : PIO_CTRL_NEXTPREV_SM_DISABLE_BITS) |</div>
<div class="line"><a id="l01056" name="l01056"></a><span class="lineno"> 1056</span>                ((mask_prev &lt;&lt; PIO_CTRL_PREV_PIO_MASK_LSB) &amp; PIO_CTRL_PREV_PIO_MASK_BITS) |</div>
<div class="line"><a id="l01057" name="l01057"></a><span class="lineno"> 1057</span>                ((mask_next &lt;&lt; PIO_CTRL_NEXT_PIO_MASK_LSB) &amp; PIO_CTRL_NEXT_PIO_MASK_BITS);</div>
<div class="line"><a id="l01058" name="l01058"></a><span class="lineno"> 1058</span> </div>
<div class="line"><a id="l01059" name="l01059"></a><span class="lineno"> 1059</span>}</div>
<div class="line"><a id="l01060" name="l01060"></a><span class="lineno"> 1060</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01061" name="l01061"></a><span class="lineno"> 1061</span> </div>
<div class="line"><a id="l01071" name="l01071"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga7b89b93dd0553c77538c70baf6a7e4f0"> 1071</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga7b89b93dd0553c77538c70baf6a7e4f0">pio_sm_restart</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01072" name="l01072"></a><span class="lineno"> 1072</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01073" name="l01073"></a><span class="lineno"> 1073</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01074" name="l01074"></a><span class="lineno"> 1074</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, 1u &lt;&lt; (PIO_CTRL_SM_RESTART_LSB + sm));</div>
<div class="line"><a id="l01075" name="l01075"></a><span class="lineno"> 1075</span>}</div>
<div class="line"><a id="l01076" name="l01076"></a><span class="lineno"> 1076</span> </div>
<div class="line"><a id="l01086" name="l01086"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gae3e115fd41d9ac29c7a13b0c213bc2cd"> 1086</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gae3e115fd41d9ac29c7a13b0c213bc2cd">pio_restart_sm_mask</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask) {</div>
<div class="line"><a id="l01087" name="l01087"></a><span class="lineno"> 1087</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01088" name="l01088"></a><span class="lineno"> 1088</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01089" name="l01089"></a><span class="lineno"> 1089</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, (mask &lt;&lt; PIO_CTRL_SM_RESTART_LSB) &amp; PIO_CTRL_SM_RESTART_BITS);</div>
<div class="line"><a id="l01090" name="l01090"></a><span class="lineno"> 1090</span>}</div>
<div class="line"><a id="l01091" name="l01091"></a><span class="lineno"> 1091</span> </div>
<div class="line"><a id="l01113" name="l01113"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gacd981b2206b02eb1c4573a0f328d7819"> 1113</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gacd981b2206b02eb1c4573a0f328d7819">pio_sm_clkdiv_restart</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01114" name="l01114"></a><span class="lineno"> 1114</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01115" name="l01115"></a><span class="lineno"> 1115</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01116" name="l01116"></a><span class="lineno"> 1116</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, 1u &lt;&lt; (PIO_CTRL_CLKDIV_RESTART_LSB + sm));</div>
<div class="line"><a id="l01117" name="l01117"></a><span class="lineno"> 1117</span>}</div>
<div class="line"><a id="l01118" name="l01118"></a><span class="lineno"> 1118</span> </div>
<div class="line"><a id="l01148" name="l01148"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118"> 1148</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118">pio_clkdiv_restart_sm_mask</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask) {</div>
<div class="line"><a id="l01149" name="l01149"></a><span class="lineno"> 1149</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01150" name="l01150"></a><span class="lineno"> 1150</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01151" name="l01151"></a><span class="lineno"> 1151</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, (mask &lt;&lt; PIO_CTRL_CLKDIV_RESTART_LSB) &amp; PIO_CTRL_CLKDIV_RESTART_BITS);</div>
<div class="line"><a id="l01152" name="l01152"></a><span class="lineno"> 1152</span>}</div>
<div class="line"><a id="l01153" name="l01153"></a><span class="lineno"> 1153</span> </div>
<div class="line"><a id="l01154" name="l01154"></a><span class="lineno"> 1154</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l01186" name="l01186"></a><span class="lineno"> 1186</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_clkdiv_restart_sm_multi_mask(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask_prev, uint32_t mask, uint32_t mask_next) {</div>
<div class="line"><a id="l01187" name="l01187"></a><span class="lineno"> 1187</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01188" name="l01188"></a><span class="lineno"> 1188</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01189" name="l01189"></a><span class="lineno"> 1189</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, ((mask &lt;&lt; PIO_CTRL_CLKDIV_RESTART_LSB) &amp; PIO_CTRL_CLKDIV_RESTART_BITS) |</div>
<div class="line"><a id="l01190" name="l01190"></a><span class="lineno"> 1190</span>                            PIO_CTRL_NEXTPREV_CLKDIV_RESTART_BITS |</div>
<div class="line"><a id="l01191" name="l01191"></a><span class="lineno"> 1191</span>                            ((mask_prev &lt;&lt; PIO_CTRL_PREV_PIO_MASK_LSB) &amp; PIO_CTRL_PREV_PIO_MASK_BITS) |</div>
<div class="line"><a id="l01192" name="l01192"></a><span class="lineno"> 1192</span>                            ((mask_next &lt;&lt; PIO_CTRL_NEXT_PIO_MASK_LSB) &amp; PIO_CTRL_NEXT_PIO_MASK_BITS));</div>
<div class="line"><a id="l01193" name="l01193"></a><span class="lineno"> 1193</span>}</div>
<div class="line"><a id="l01194" name="l01194"></a><span class="lineno"> 1194</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01195" name="l01195"></a><span class="lineno"> 1195</span> </div>
<div class="line"><a id="l01207" name="l01207"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398"> 1207</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398">pio_enable_sm_mask_in_sync</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask) {</div>
<div class="line"><a id="l01208" name="l01208"></a><span class="lineno"> 1208</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01209" name="l01209"></a><span class="lineno"> 1209</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01210" name="l01210"></a><span class="lineno"> 1210</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl,</div>
<div class="line"><a id="l01211" name="l01211"></a><span class="lineno"> 1211</span>        ((mask &lt;&lt; PIO_CTRL_CLKDIV_RESTART_LSB) &amp; PIO_CTRL_CLKDIV_RESTART_BITS) |</div>
<div class="line"><a id="l01212" name="l01212"></a><span class="lineno"> 1212</span>        ((mask &lt;&lt; PIO_CTRL_SM_ENABLE_LSB) &amp; PIO_CTRL_SM_ENABLE_BITS));</div>
<div class="line"><a id="l01213" name="l01213"></a><span class="lineno"> 1213</span>}</div>
<div class="line"><a id="l01214" name="l01214"></a><span class="lineno"> 1214</span> </div>
<div class="line"><a id="l01215" name="l01215"></a><span class="lineno"> 1215</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l01229" name="l01229"></a><span class="lineno"> 1229</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_enable_sm_multi_mask_in_sync(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t mask_prev, uint32_t mask, uint32_t mask_next) {</div>
<div class="line"><a id="l01230" name="l01230"></a><span class="lineno"> 1230</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01231" name="l01231"></a><span class="lineno"> 1231</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01232" name="l01232"></a><span class="lineno"> 1232</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01233" name="l01233"></a><span class="lineno"> 1233</span>    check_sm_mask(mask);</div>
<div class="line"><a id="l01234" name="l01234"></a><span class="lineno"> 1234</span>    <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;ctrl, ((mask &lt;&lt; PIO_CTRL_CLKDIV_RESTART_LSB) &amp; PIO_CTRL_CLKDIV_RESTART_BITS) |</div>
<div class="line"><a id="l01235" name="l01235"></a><span class="lineno"> 1235</span>                            ((mask &lt;&lt; PIO_CTRL_SM_ENABLE_LSB) &amp; PIO_CTRL_SM_ENABLE_BITS) |</div>
<div class="line"><a id="l01236" name="l01236"></a><span class="lineno"> 1236</span>                            PIO_CTRL_NEXTPREV_CLKDIV_RESTART_BITS | PIO_CTRL_NEXTPREV_SM_ENABLE_BITS |</div>
<div class="line"><a id="l01237" name="l01237"></a><span class="lineno"> 1237</span>                            ((mask_prev &lt;&lt; PIO_CTRL_PREV_PIO_MASK_LSB) &amp; PIO_CTRL_PREV_PIO_MASK_BITS) |</div>
<div class="line"><a id="l01238" name="l01238"></a><span class="lineno"> 1238</span>                            ((mask_next &lt;&lt; PIO_CTRL_NEXT_PIO_MASK_LSB) &amp; PIO_CTRL_NEXT_PIO_MASK_BITS));</div>
<div class="line"><a id="l01239" name="l01239"></a><span class="lineno"> 1239</span>}</div>
<div class="line"><a id="l01240" name="l01240"></a><span class="lineno"> 1240</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01241" name="l01241"></a><span class="lineno"> 1241</span> </div>
<div class="line"><a id="l01245" name="l01245"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc"> 1245</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a> {</div>
<div class="line"><a id="l01246" name="l01246"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742"> 1246</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742">pis_interrupt0</a> = PIO_INTR_SM0_LSB,                        </div>
<div class="line"><a id="l01247" name="l01247"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49"> 1247</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49">pis_interrupt1</a> = PIO_INTR_SM1_LSB,                        </div>
<div class="line"><a id="l01248" name="l01248"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4"> 1248</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4">pis_interrupt2</a> = PIO_INTR_SM2_LSB,                        </div>
<div class="line"><a id="l01249" name="l01249"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f"> 1249</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f">pis_interrupt3</a> = PIO_INTR_SM3_LSB,                        </div>
<div class="line"><a id="l01250" name="l01250"></a><span class="lineno"> 1250</span><span class="preprocessor">#if PICO_PIO_VERSION &gt; 0</span></div>
<div class="line"><a id="l01251" name="l01251"></a><span class="lineno"> 1251</span>    pis_interrupt4 = PIO_INTR_SM4_LSB,                        </div>
<div class="line"><a id="l01252" name="l01252"></a><span class="lineno"> 1252</span>    pis_interrupt5 = PIO_INTR_SM5_LSB,                        </div>
<div class="line"><a id="l01253" name="l01253"></a><span class="lineno"> 1253</span>    pis_interrupt6 = PIO_INTR_SM6_LSB,                        </div>
<div class="line"><a id="l01254" name="l01254"></a><span class="lineno"> 1254</span>    pis_interrupt7 = PIO_INTR_SM7_LSB,                        </div>
<div class="line"><a id="l01255" name="l01255"></a><span class="lineno"> 1255</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01256" name="l01256"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1"> 1256</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1">pis_sm0_tx_fifo_not_full</a> = PIO_INTR_SM0_TXNFULL_LSB,      </div>
<div class="line"><a id="l01257" name="l01257"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48"> 1257</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48">pis_sm1_tx_fifo_not_full</a> = PIO_INTR_SM1_TXNFULL_LSB,      </div>
<div class="line"><a id="l01258" name="l01258"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d"> 1258</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d">pis_sm2_tx_fifo_not_full</a> = PIO_INTR_SM2_TXNFULL_LSB,      </div>
<div class="line"><a id="l01259" name="l01259"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297"> 1259</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297">pis_sm3_tx_fifo_not_full</a> = PIO_INTR_SM3_TXNFULL_LSB,      </div>
<div class="line"><a id="l01260" name="l01260"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52"> 1260</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52">pis_sm0_rx_fifo_not_empty</a> = PIO_INTR_SM0_RXNEMPTY_LSB,    </div>
<div class="line"><a id="l01261" name="l01261"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c"> 1261</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c">pis_sm1_rx_fifo_not_empty</a> = PIO_INTR_SM1_RXNEMPTY_LSB,    </div>
<div class="line"><a id="l01262" name="l01262"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac"> 1262</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac">pis_sm2_rx_fifo_not_empty</a> = PIO_INTR_SM2_RXNEMPTY_LSB,    </div>
<div class="line"><a id="l01263" name="l01263"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698"> 1263</a></span>    <a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698">pis_sm3_rx_fifo_not_empty</a> = PIO_INTR_SM3_RXNEMPTY_LSB,    </div>
<div class="line"><a id="l01264" name="l01264"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe"> 1264</a></span>} <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>;</div>
<div class="line"><a id="l01265" name="l01265"></a><span class="lineno"> 1265</span> </div>
<div class="line"><a id="l01273" name="l01273"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gafe39a664c508e08ef4c74b7c3c38bc07"> 1273</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gafe39a664c508e08ef4c74b7c3c38bc07">pio_set_irq0_source_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01274" name="l01274"></a><span class="lineno"> 1274</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01275" name="l01275"></a><span class="lineno"> 1275</span>    invalid_params_if(HARDWARE_PIO, source &gt;= 32u || (1u &lt;&lt; source) &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01276" name="l01276"></a><span class="lineno"> 1276</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l01277" name="l01277"></a><span class="lineno"> 1277</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;inte0, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01278" name="l01278"></a><span class="lineno"> 1278</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l01279" name="l01279"></a><span class="lineno"> 1279</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;inte0, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01280" name="l01280"></a><span class="lineno"> 1280</span>}</div>
<div class="line"><a id="l01281" name="l01281"></a><span class="lineno"> 1281</span> </div>
<div class="line"><a id="l01289" name="l01289"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga4369e665ee8d2db58a83eccad65c917c"> 1289</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga4369e665ee8d2db58a83eccad65c917c">pio_set_irq1_source_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01290" name="l01290"></a><span class="lineno"> 1290</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01291" name="l01291"></a><span class="lineno"> 1291</span>    invalid_params_if(HARDWARE_PIO, source &gt;= 32 || (1u &lt;&lt; source) &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01292" name="l01292"></a><span class="lineno"> 1292</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l01293" name="l01293"></a><span class="lineno"> 1293</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;inte1, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01294" name="l01294"></a><span class="lineno"> 1294</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l01295" name="l01295"></a><span class="lineno"> 1295</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;inte1, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01296" name="l01296"></a><span class="lineno"> 1296</span>}</div>
<div class="line"><a id="l01297" name="l01297"></a><span class="lineno"> 1297</span> </div>
<div class="line"><a id="l01305" name="l01305"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga81259bc71fd3bd81b96e47f9f4ea7b67"> 1305</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga81259bc71fd3bd81b96e47f9f4ea7b67">pio_set_irq0_source_mask_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t source_mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01306" name="l01306"></a><span class="lineno"> 1306</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01307" name="l01307"></a><span class="lineno"> 1307</span>    invalid_params_if(HARDWARE_PIO, source_mask &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01308" name="l01308"></a><span class="lineno"> 1308</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l01309" name="l01309"></a><span class="lineno"> 1309</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;inte0, source_mask);</div>
<div class="line"><a id="l01310" name="l01310"></a><span class="lineno"> 1310</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l01311" name="l01311"></a><span class="lineno"> 1311</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;inte0, source_mask);</div>
<div class="line"><a id="l01312" name="l01312"></a><span class="lineno"> 1312</span>    }</div>
<div class="line"><a id="l01313" name="l01313"></a><span class="lineno"> 1313</span>}</div>
<div class="line"><a id="l01314" name="l01314"></a><span class="lineno"> 1314</span> </div>
<div class="line"><a id="l01322" name="l01322"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gae39150dd6910d2776484526059911b79"> 1322</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gae39150dd6910d2776484526059911b79">pio_set_irq1_source_mask_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint32_t source_mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01323" name="l01323"></a><span class="lineno"> 1323</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01324" name="l01324"></a><span class="lineno"> 1324</span>    invalid_params_if(HARDWARE_PIO, source_mask &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01325" name="l01325"></a><span class="lineno"> 1325</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l01326" name="l01326"></a><span class="lineno"> 1326</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;inte1, source_mask);</div>
<div class="line"><a id="l01327" name="l01327"></a><span class="lineno"> 1327</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l01328" name="l01328"></a><span class="lineno"> 1328</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;inte1, source_mask);</div>
<div class="line"><a id="l01329" name="l01329"></a><span class="lineno"> 1329</span>    }</div>
<div class="line"><a id="l01330" name="l01330"></a><span class="lineno"> 1330</span>}</div>
<div class="line"><a id="l01331" name="l01331"></a><span class="lineno"> 1331</span> </div>
<div class="line"><a id="l01340" name="l01340"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992"> 1340</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">pio_set_irqn_source_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint irq_index, <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> source, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01341" name="l01341"></a><span class="lineno"> 1341</span>    invalid_params_if(HARDWARE_PIO, irq_index &gt; NUM_PIO_IRQS);</div>
<div class="line"><a id="l01342" name="l01342"></a><span class="lineno"> 1342</span>    invalid_params_if(HARDWARE_PIO, source &gt;= 32 || (1u &lt;&lt; source) &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01343" name="l01343"></a><span class="lineno"> 1343</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l01344" name="l01344"></a><span class="lineno"> 1344</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;irq_ctrl[irq_index].inte, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01345" name="l01345"></a><span class="lineno"> 1345</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l01346" name="l01346"></a><span class="lineno"> 1346</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;irq_ctrl[irq_index].inte, 1u &lt;&lt; source);</div>
<div class="line"><a id="l01347" name="l01347"></a><span class="lineno"> 1347</span>}</div>
<div class="line"><a id="l01348" name="l01348"></a><span class="lineno"> 1348</span> </div>
<div class="line"><a id="l01357" name="l01357"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gafc173eb3cb980ed3c823384e42e265bb"> 1357</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gafc173eb3cb980ed3c823384e42e265bb">pio_set_irqn_source_mask_enabled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint irq_index, uint32_t source_mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l01358" name="l01358"></a><span class="lineno"> 1358</span>    invalid_params_if(HARDWARE_PIO, irq_index &gt; NUM_PIO_IRQS);</div>
<div class="line"><a id="l01359" name="l01359"></a><span class="lineno"> 1359</span>    <span class="keyword">static_assert</span>(NUM_PIO_IRQS == 2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l01360" name="l01360"></a><span class="lineno"> 1360</span>    invalid_params_if(HARDWARE_PIO, source_mask &gt; PIO_INTR_BITS);</div>
<div class="line"><a id="l01361" name="l01361"></a><span class="lineno"> 1361</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l01362" name="l01362"></a><span class="lineno"> 1362</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;pio-&gt;irq_ctrl[irq_index].inte, source_mask);</div>
<div class="line"><a id="l01363" name="l01363"></a><span class="lineno"> 1363</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l01364" name="l01364"></a><span class="lineno"> 1364</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;pio-&gt;irq_ctrl[irq_index].inte, source_mask);</div>
<div class="line"><a id="l01365" name="l01365"></a><span class="lineno"> 1365</span>    }</div>
<div class="line"><a id="l01366" name="l01366"></a><span class="lineno"> 1366</span>}</div>
<div class="line"><a id="l01367" name="l01367"></a><span class="lineno"> 1367</span> </div>
<div class="line"><a id="l01375" name="l01375"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaa92c20b2d08f3b8a6bc35cd602a092e4"> 1375</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gaa92c20b2d08f3b8a6bc35cd602a092e4">pio_interrupt_get</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint pio_interrupt_num) {</div>
<div class="line"><a id="l01376" name="l01376"></a><span class="lineno"> 1376</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01377" name="l01377"></a><span class="lineno"> 1377</span>    invalid_params_if(HARDWARE_PIO, pio_interrupt_num &gt;= 8);</div>
<div class="line"><a id="l01378" name="l01378"></a><span class="lineno"> 1378</span>    <span class="keywordflow">return</span> pio-&gt;irq &amp; (1u &lt;&lt; pio_interrupt_num);</div>
<div class="line"><a id="l01379" name="l01379"></a><span class="lineno"> 1379</span>}</div>
<div class="line"><a id="l01380" name="l01380"></a><span class="lineno"> 1380</span> </div>
<div class="line"><a id="l01387" name="l01387"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga6f650eb98640eac2346ff26b46dc378b"> 1387</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga6f650eb98640eac2346ff26b46dc378b">pio_interrupt_clear</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint pio_interrupt_num) {</div>
<div class="line"><a id="l01388" name="l01388"></a><span class="lineno"> 1388</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01389" name="l01389"></a><span class="lineno"> 1389</span>    invalid_params_if(HARDWARE_PIO, pio_interrupt_num &gt;= 8);</div>
<div class="line"><a id="l01390" name="l01390"></a><span class="lineno"> 1390</span>    pio-&gt;irq = (1u &lt;&lt; pio_interrupt_num);</div>
<div class="line"><a id="l01391" name="l01391"></a><span class="lineno"> 1391</span>}</div>
<div class="line"><a id="l01392" name="l01392"></a><span class="lineno"> 1392</span> </div>
<div class="line"><a id="l01400" name="l01400"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga9c0ea409da4fcb98586120b575921c31"> 1400</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code hl_function" href="group__hardware__pio.html#ga9c0ea409da4fcb98586120b575921c31">pio_sm_get_pc</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01401" name="l01401"></a><span class="lineno"> 1401</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01402" name="l01402"></a><span class="lineno"> 1402</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01403" name="l01403"></a><span class="lineno"> 1403</span>    <span class="keywordflow">return</span> (uint8_t) pio-&gt;sm[sm].addr;</div>
<div class="line"><a id="l01404" name="l01404"></a><span class="lineno"> 1404</span>}</div>
<div class="line"><a id="l01405" name="l01405"></a><span class="lineno"> 1405</span> </div>
<div class="line"><a id="l01418" name="l01418"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2"> 1418</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2">pio_sm_exec</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint instr) {</div>
<div class="line"><a id="l01419" name="l01419"></a><span class="lineno"> 1419</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01420" name="l01420"></a><span class="lineno"> 1420</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01421" name="l01421"></a><span class="lineno"> 1421</span>    pio-&gt;sm[sm].instr = instr;</div>
<div class="line"><a id="l01422" name="l01422"></a><span class="lineno"> 1422</span>}</div>
<div class="line"><a id="l01423" name="l01423"></a><span class="lineno"> 1423</span> </div>
<div class="line"><a id="l01431" name="l01431"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b"> 1431</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b">pio_sm_is_exec_stalled</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01432" name="l01432"></a><span class="lineno"> 1432</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01433" name="l01433"></a><span class="lineno"> 1433</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01434" name="l01434"></a><span class="lineno"> 1434</span>    <span class="keywordflow">return</span> pio-&gt;sm[sm].execctrl &amp; PIO_SM0_EXECCTRL_EXEC_STALLED_BITS;</div>
<div class="line"><a id="l01435" name="l01435"></a><span class="lineno"> 1435</span>}</div>
<div class="line"><a id="l01436" name="l01436"></a><span class="lineno"> 1436</span> </div>
<div class="line"><a id="l01449" name="l01449"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga1bf1b296713b76e19b87b59b84136b2c"> 1449</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga1bf1b296713b76e19b87b59b84136b2c">pio_sm_exec_wait_blocking</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint instr) {</div>
<div class="line"><a id="l01450" name="l01450"></a><span class="lineno"> 1450</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01451" name="l01451"></a><span class="lineno"> 1451</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01452" name="l01452"></a><span class="lineno"> 1452</span>    <a class="code hl_function" href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2">pio_sm_exec</a>(pio, sm, instr);</div>
<div class="line"><a id="l01453" name="l01453"></a><span class="lineno"> 1453</span>    <span class="keywordflow">while</span> (<a class="code hl_function" href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b">pio_sm_is_exec_stalled</a>(pio, sm)) <a class="code hl_function" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a>();</div>
<div class="line"><a id="l01454" name="l01454"></a><span class="lineno"> 1454</span>}</div>
<div class="line"><a id="l01455" name="l01455"></a><span class="lineno"> 1455</span> </div>
<div class="line"><a id="l01465" name="l01465"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga74a681208957ab2bc8c8aafff9bb9f7c"> 1465</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga74a681208957ab2bc8c8aafff9bb9f7c">pio_sm_set_wrap</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint wrap_target, uint wrap) {</div>
<div class="line"><a id="l01466" name="l01466"></a><span class="lineno"> 1466</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01467" name="l01467"></a><span class="lineno"> 1467</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01468" name="l01468"></a><span class="lineno"> 1468</span>    valid_params_if(HARDWARE_PIO, wrap &lt; PIO_INSTRUCTION_COUNT);</div>
<div class="line"><a id="l01469" name="l01469"></a><span class="lineno"> 1469</span>    valid_params_if(HARDWARE_PIO, wrap_target &lt; PIO_INSTRUCTION_COUNT);</div>
<div class="line"><a id="l01470" name="l01470"></a><span class="lineno"> 1470</span>    pio-&gt;sm[sm].execctrl =</div>
<div class="line"><a id="l01471" name="l01471"></a><span class="lineno"> 1471</span>            (pio-&gt;sm[sm].execctrl &amp; ~(PIO_SM0_EXECCTRL_WRAP_TOP_BITS | PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS)) |</div>
<div class="line"><a id="l01472" name="l01472"></a><span class="lineno"> 1472</span>            (wrap_target &lt;&lt; PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB) |</div>
<div class="line"><a id="l01473" name="l01473"></a><span class="lineno"> 1473</span>            (wrap &lt;&lt; PIO_SM0_EXECCTRL_WRAP_TOP_LSB);</div>
<div class="line"><a id="l01474" name="l01474"></a><span class="lineno"> 1474</span>}</div>
<div class="line"><a id="l01475" name="l01475"></a><span class="lineno"> 1475</span> </div>
<div class="line"><a id="l01486" name="l01486"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga7f0190e662c5b6e24d91044b42010ffc"> 1486</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga7f0190e662c5b6e24d91044b42010ffc">pio_sm_set_out_pins</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint out_base, uint out_count) {</div>
<div class="line"><a id="l01487" name="l01487"></a><span class="lineno"> 1487</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01488" name="l01488"></a><span class="lineno"> 1488</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01489" name="l01489"></a><span class="lineno"> 1489</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l01490" name="l01490"></a><span class="lineno"> 1490</span>    out_base -= <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l01491" name="l01491"></a><span class="lineno"> 1491</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01492" name="l01492"></a><span class="lineno"> 1492</span>    valid_params_if(HARDWARE_PIO, out_base &lt; 32);</div>
<div class="line"><a id="l01493" name="l01493"></a><span class="lineno"> 1493</span>    valid_params_if(HARDWARE_PIO, out_count &lt;= 32);</div>
<div class="line"><a id="l01494" name="l01494"></a><span class="lineno"> 1494</span>    pio-&gt;sm[sm].pinctrl = (pio-&gt;sm[sm].pinctrl &amp; ~(PIO_SM0_PINCTRL_OUT_BASE_BITS | PIO_SM0_PINCTRL_OUT_COUNT_BITS)) |</div>
<div class="line"><a id="l01495" name="l01495"></a><span class="lineno"> 1495</span>                 (out_base &lt;&lt; PIO_SM0_PINCTRL_OUT_BASE_LSB) |</div>
<div class="line"><a id="l01496" name="l01496"></a><span class="lineno"> 1496</span>                 (out_count &lt;&lt; PIO_SM0_PINCTRL_OUT_COUNT_LSB);</div>
<div class="line"><a id="l01497" name="l01497"></a><span class="lineno"> 1497</span>}</div>
<div class="line"><a id="l01498" name="l01498"></a><span class="lineno"> 1498</span> </div>
<div class="line"><a id="l01499" name="l01499"></a><span class="lineno"> 1499</span> </div>
<div class="line"><a id="l01510" name="l01510"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gacaf6ee284dc834fbb742d1eef6180e6c"> 1510</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gacaf6ee284dc834fbb742d1eef6180e6c">pio_sm_set_set_pins</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint set_base, uint set_count) {</div>
<div class="line"><a id="l01511" name="l01511"></a><span class="lineno"> 1511</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01512" name="l01512"></a><span class="lineno"> 1512</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01513" name="l01513"></a><span class="lineno"> 1513</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l01514" name="l01514"></a><span class="lineno"> 1514</span>    set_base -= <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l01515" name="l01515"></a><span class="lineno"> 1515</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01516" name="l01516"></a><span class="lineno"> 1516</span>    valid_params_if(HARDWARE_PIO, set_base &lt; 32);</div>
<div class="line"><a id="l01517" name="l01517"></a><span class="lineno"> 1517</span>    valid_params_if(HARDWARE_PIO, set_count &lt;= 5);</div>
<div class="line"><a id="l01518" name="l01518"></a><span class="lineno"> 1518</span>    pio-&gt;sm[sm].pinctrl = (pio-&gt;sm[sm].pinctrl &amp; ~(PIO_SM0_PINCTRL_SET_BASE_BITS | PIO_SM0_PINCTRL_SET_COUNT_BITS)) |</div>
<div class="line"><a id="l01519" name="l01519"></a><span class="lineno"> 1519</span>                 (set_base &lt;&lt; PIO_SM0_PINCTRL_SET_BASE_LSB) |</div>
<div class="line"><a id="l01520" name="l01520"></a><span class="lineno"> 1520</span>                 (set_count &lt;&lt; PIO_SM0_PINCTRL_SET_COUNT_LSB);</div>
<div class="line"><a id="l01521" name="l01521"></a><span class="lineno"> 1521</span>}</div>
<div class="line"><a id="l01522" name="l01522"></a><span class="lineno"> 1522</span> </div>
<div class="line"><a id="l01532" name="l01532"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaef50ef92f7ea0666dffe939c0b3fd24c"> 1532</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaef50ef92f7ea0666dffe939c0b3fd24c">pio_sm_set_in_pins</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint in_base) {</div>
<div class="line"><a id="l01533" name="l01533"></a><span class="lineno"> 1533</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01534" name="l01534"></a><span class="lineno"> 1534</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01535" name="l01535"></a><span class="lineno"> 1535</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l01536" name="l01536"></a><span class="lineno"> 1536</span>    in_base -= <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l01537" name="l01537"></a><span class="lineno"> 1537</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01538" name="l01538"></a><span class="lineno"> 1538</span>    valid_params_if(HARDWARE_PIO, in_base &lt; 32);</div>
<div class="line"><a id="l01539" name="l01539"></a><span class="lineno"> 1539</span>    pio-&gt;sm[sm].pinctrl = (pio-&gt;sm[sm].pinctrl &amp; ~PIO_SM0_PINCTRL_IN_BASE_BITS) |</div>
<div class="line"><a id="l01540" name="l01540"></a><span class="lineno"> 1540</span>                 (in_base &lt;&lt; PIO_SM0_PINCTRL_IN_BASE_LSB);</div>
<div class="line"><a id="l01541" name="l01541"></a><span class="lineno"> 1541</span>}</div>
<div class="line"><a id="l01542" name="l01542"></a><span class="lineno"> 1542</span> </div>
<div class="line"><a id="l01552" name="l01552"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga87cb36afe5783e2e92bf528b1d50ea07"> 1552</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga87cb36afe5783e2e92bf528b1d50ea07">pio_sm_set_sideset_pins</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint sideset_base) {</div>
<div class="line"><a id="l01553" name="l01553"></a><span class="lineno"> 1553</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01554" name="l01554"></a><span class="lineno"> 1554</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01555" name="l01555"></a><span class="lineno"> 1555</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l01556" name="l01556"></a><span class="lineno"> 1556</span>    sideset_base -= <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l01557" name="l01557"></a><span class="lineno"> 1557</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01558" name="l01558"></a><span class="lineno"> 1558</span>    valid_params_if(HARDWARE_PIO, sideset_base &lt; 32);</div>
<div class="line"><a id="l01559" name="l01559"></a><span class="lineno"> 1559</span>    pio-&gt;sm[sm].pinctrl = (pio-&gt;sm[sm].pinctrl &amp; ~PIO_SM0_PINCTRL_SIDESET_BASE_BITS) |</div>
<div class="line"><a id="l01560" name="l01560"></a><span class="lineno"> 1560</span>                 (sideset_base &lt;&lt; PIO_SM0_PINCTRL_SIDESET_BASE_LSB);</div>
<div class="line"><a id="l01561" name="l01561"></a><span class="lineno"> 1561</span>}</div>
<div class="line"><a id="l01562" name="l01562"></a><span class="lineno"> 1562</span> </div>
<div class="line"><a id="l01571" name="l01571"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga97b135c9016b91fbf237c93313d25fd4"> 1571</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga97b135c9016b91fbf237c93313d25fd4">pio_sm_set_jmp_pin</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint pin) {</div>
<div class="line"><a id="l01572" name="l01572"></a><span class="lineno"> 1572</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01573" name="l01573"></a><span class="lineno"> 1573</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01574" name="l01574"></a><span class="lineno"> 1574</span><span class="preprocessor">#if PICO_PIO_USE_GPIO_BASE</span></div>
<div class="line"><a id="l01575" name="l01575"></a><span class="lineno"> 1575</span>    pin -= <a class="code hl_function" href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a>(pio);</div>
<div class="line"><a id="l01576" name="l01576"></a><span class="lineno"> 1576</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l01577" name="l01577"></a><span class="lineno"> 1577</span>    valid_params_if(HARDWARE_PIO, pin &lt; 32);</div>
<div class="line"><a id="l01578" name="l01578"></a><span class="lineno"> 1578</span>    pio-&gt;sm[sm].execctrl =</div>
<div class="line"><a id="l01579" name="l01579"></a><span class="lineno"> 1579</span>        (pio-&gt;sm[sm].execctrl &amp; ~PIO_SM0_EXECCTRL_JMP_PIN_BITS)</div>
<div class="line"><a id="l01580" name="l01580"></a><span class="lineno"> 1580</span>        | (pin &lt;&lt; PIO_SM0_EXECCTRL_JMP_PIN_LSB);</div>
<div class="line"><a id="l01581" name="l01581"></a><span class="lineno"> 1581</span>}</div>
<div class="line"><a id="l01582" name="l01582"></a><span class="lineno"> 1582</span> </div>
<div class="line"><a id="l01597" name="l01597"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235"> 1597</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235">pio_sm_put</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t data) {</div>
<div class="line"><a id="l01598" name="l01598"></a><span class="lineno"> 1598</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01599" name="l01599"></a><span class="lineno"> 1599</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01600" name="l01600"></a><span class="lineno"> 1600</span>    pio-&gt;txf[sm] = data;</div>
<div class="line"><a id="l01601" name="l01601"></a><span class="lineno"> 1601</span>}</div>
<div class="line"><a id="l01602" name="l01602"></a><span class="lineno"> 1602</span> </div>
<div class="line"><a id="l01618" name="l01618"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa"> 1618</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code hl_function" href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa">pio_sm_get</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01619" name="l01619"></a><span class="lineno"> 1619</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01620" name="l01620"></a><span class="lineno"> 1620</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01621" name="l01621"></a><span class="lineno"> 1621</span>    <span class="keywordflow">return</span> pio-&gt;rxf[sm];</div>
<div class="line"><a id="l01622" name="l01622"></a><span class="lineno"> 1622</span>}</div>
<div class="line"><a id="l01623" name="l01623"></a><span class="lineno"> 1623</span> </div>
<div class="line"><a id="l01631" name="l01631"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga71e388315eb6a77a6560b77ec13145a4"> 1631</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#ga71e388315eb6a77a6560b77ec13145a4">pio_sm_is_rx_fifo_full</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01632" name="l01632"></a><span class="lineno"> 1632</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01633" name="l01633"></a><span class="lineno"> 1633</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01634" name="l01634"></a><span class="lineno"> 1634</span>    <span class="keywordflow">return</span> (pio-&gt;fstat &amp; (1u &lt;&lt; (PIO_FSTAT_RXFULL_LSB + sm))) != 0;</div>
<div class="line"><a id="l01635" name="l01635"></a><span class="lineno"> 1635</span>}</div>
<div class="line"><a id="l01636" name="l01636"></a><span class="lineno"> 1636</span> </div>
<div class="line"><a id="l01644" name="l01644"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df"> 1644</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df">pio_sm_is_rx_fifo_empty</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01645" name="l01645"></a><span class="lineno"> 1645</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01646" name="l01646"></a><span class="lineno"> 1646</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01647" name="l01647"></a><span class="lineno"> 1647</span>    <span class="keywordflow">return</span> (pio-&gt;fstat &amp; (1u &lt;&lt; (PIO_FSTAT_RXEMPTY_LSB + sm))) != 0;</div>
<div class="line"><a id="l01648" name="l01648"></a><span class="lineno"> 1648</span>}</div>
<div class="line"><a id="l01649" name="l01649"></a><span class="lineno"> 1649</span> </div>
<div class="line"><a id="l01657" name="l01657"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga8fa0b87fde0db10be2934de542f9d6c2"> 1657</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#ga8fa0b87fde0db10be2934de542f9d6c2">pio_sm_get_rx_fifo_level</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01658" name="l01658"></a><span class="lineno"> 1658</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01659" name="l01659"></a><span class="lineno"> 1659</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01660" name="l01660"></a><span class="lineno"> 1660</span>    uint bitoffs = PIO_FLEVEL_RX0_LSB + sm * (PIO_FLEVEL_RX1_LSB - PIO_FLEVEL_RX0_LSB);</div>
<div class="line"><a id="l01661" name="l01661"></a><span class="lineno"> 1661</span>    <span class="keyword">const</span> uint32_t mask = PIO_FLEVEL_RX0_BITS &gt;&gt; PIO_FLEVEL_RX0_LSB;</div>
<div class="line"><a id="l01662" name="l01662"></a><span class="lineno"> 1662</span>    <span class="keywordflow">return</span> (pio-&gt;flevel &gt;&gt; bitoffs) &amp; mask;</div>
<div class="line"><a id="l01663" name="l01663"></a><span class="lineno"> 1663</span>}</div>
<div class="line"><a id="l01664" name="l01664"></a><span class="lineno"> 1664</span> </div>
<div class="line"><a id="l01672" name="l01672"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52"> 1672</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52">pio_sm_is_tx_fifo_full</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01673" name="l01673"></a><span class="lineno"> 1673</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01674" name="l01674"></a><span class="lineno"> 1674</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01675" name="l01675"></a><span class="lineno"> 1675</span>    <span class="keywordflow">return</span> (pio-&gt;fstat &amp; (1u &lt;&lt; (PIO_FSTAT_TXFULL_LSB + sm))) != 0;</div>
<div class="line"><a id="l01676" name="l01676"></a><span class="lineno"> 1676</span>}</div>
<div class="line"><a id="l01677" name="l01677"></a><span class="lineno"> 1677</span> </div>
<div class="line"><a id="l01685" name="l01685"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gadf4ae3f4a334c1dcac1b62b148508bf2"> 1685</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#gadf4ae3f4a334c1dcac1b62b148508bf2">pio_sm_is_tx_fifo_empty</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01686" name="l01686"></a><span class="lineno"> 1686</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01687" name="l01687"></a><span class="lineno"> 1687</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01688" name="l01688"></a><span class="lineno"> 1688</span>    <span class="keywordflow">return</span> (pio-&gt;fstat &amp; (1u &lt;&lt; (PIO_FSTAT_TXEMPTY_LSB + sm))) != 0;</div>
<div class="line"><a id="l01689" name="l01689"></a><span class="lineno"> 1689</span>}</div>
<div class="line"><a id="l01690" name="l01690"></a><span class="lineno"> 1690</span> </div>
<div class="line"><a id="l01698" name="l01698"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga009b3f44f112208114972c32546dfddb"> 1698</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__pio.html#ga009b3f44f112208114972c32546dfddb">pio_sm_get_tx_fifo_level</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01699" name="l01699"></a><span class="lineno"> 1699</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01700" name="l01700"></a><span class="lineno"> 1700</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01701" name="l01701"></a><span class="lineno"> 1701</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bitoffs = PIO_FLEVEL_TX0_LSB + sm * (PIO_FLEVEL_TX1_LSB - PIO_FLEVEL_TX0_LSB);</div>
<div class="line"><a id="l01702" name="l01702"></a><span class="lineno"> 1702</span>    <span class="keyword">const</span> uint32_t mask = PIO_FLEVEL_TX0_BITS &gt;&gt; PIO_FLEVEL_TX0_LSB;</div>
<div class="line"><a id="l01703" name="l01703"></a><span class="lineno"> 1703</span>    <span class="keywordflow">return</span> (pio-&gt;flevel &gt;&gt; bitoffs) &amp; mask;</div>
<div class="line"><a id="l01704" name="l01704"></a><span class="lineno"> 1704</span>}</div>
<div class="line"><a id="l01705" name="l01705"></a><span class="lineno"> 1705</span> </div>
<div class="line"><a id="l01713" name="l01713"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377"> 1713</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377">pio_sm_put_blocking</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t data) {</div>
<div class="line"><a id="l01714" name="l01714"></a><span class="lineno"> 1714</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01715" name="l01715"></a><span class="lineno"> 1715</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01716" name="l01716"></a><span class="lineno"> 1716</span>    <span class="keywordflow">while</span> (<a class="code hl_function" href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52">pio_sm_is_tx_fifo_full</a>(pio, sm)) <a class="code hl_function" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a>();</div>
<div class="line"><a id="l01717" name="l01717"></a><span class="lineno"> 1717</span>    <a class="code hl_function" href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235">pio_sm_put</a>(pio, sm, data);</div>
<div class="line"><a id="l01718" name="l01718"></a><span class="lineno"> 1718</span>}</div>
<div class="line"><a id="l01719" name="l01719"></a><span class="lineno"> 1719</span> </div>
<div class="line"><a id="l01726" name="l01726"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885"> 1726</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code hl_function" href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885">pio_sm_get_blocking</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01727" name="l01727"></a><span class="lineno"> 1727</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01728" name="l01728"></a><span class="lineno"> 1728</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01729" name="l01729"></a><span class="lineno"> 1729</span>    <span class="keywordflow">while</span> (<a class="code hl_function" href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df">pio_sm_is_rx_fifo_empty</a>(pio, sm)) <a class="code hl_function" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a>();</div>
<div class="line"><a id="l01730" name="l01730"></a><span class="lineno"> 1730</span>    <span class="keywordflow">return</span> <a class="code hl_function" href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa">pio_sm_get</a>(pio, sm);</div>
<div class="line"><a id="l01731" name="l01731"></a><span class="lineno"> 1731</span>}</div>
<div class="line"><a id="l01732" name="l01732"></a><span class="lineno"> 1732</span> </div>
<div class="line"><a id="l01746" name="l01746"></a><span class="lineno"> 1746</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga46af88f03a0c5abe4d55d45c5b2ccfb7">pio_sm_drain_tx_fifo</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm);</div>
<div class="line"><a id="l01747" name="l01747"></a><span class="lineno"> 1747</span> </div>
<div class="line"><a id="l01756" name="l01756"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga14e41e953fe3a7f18e7433c57e898f92"> 1756</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga14e41e953fe3a7f18e7433c57e898f92">pio_sm_set_clkdiv_int_frac8</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t div_int, uint8_t div_frac8) {</div>
<div class="line"><a id="l01757" name="l01757"></a><span class="lineno"> 1757</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01758" name="l01758"></a><span class="lineno"> 1758</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01759" name="l01759"></a><span class="lineno"> 1759</span>    <span class="keyword">static_assert</span>(REG_FIELD_WIDTH(PIO_SM0_CLKDIV_INT) == 16, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l01760" name="l01760"></a><span class="lineno"> 1760</span>    invalid_params_if(HARDWARE_PIO, div_int &gt;&gt; 16);</div>
<div class="line"><a id="l01761" name="l01761"></a><span class="lineno"> 1761</span>    invalid_params_if(HARDWARE_PIO, div_int == 0 &amp;&amp; div_frac8 != 0);</div>
<div class="line"><a id="l01762" name="l01762"></a><span class="lineno"> 1762</span>    <span class="keyword">static_assert</span>(REG_FIELD_WIDTH(PIO_SM0_CLKDIV_FRAC) == 8, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l01763" name="l01763"></a><span class="lineno"> 1763</span>    pio-&gt;sm[sm].clkdiv =</div>
<div class="line"><a id="l01764" name="l01764"></a><span class="lineno"> 1764</span>            (((uint)div_frac8) &lt;&lt; PIO_SM0_CLKDIV_FRAC_LSB) |</div>
<div class="line"><a id="l01765" name="l01765"></a><span class="lineno"> 1765</span>            (((uint)div_int) &lt;&lt; PIO_SM0_CLKDIV_INT_LSB);</div>
<div class="line"><a id="l01766" name="l01766"></a><span class="lineno"> 1766</span>}</div>
<div class="line"><a id="l01767" name="l01767"></a><span class="lineno"> 1767</span> </div>
<div class="line"><a id="l01768" name="l01768"></a><span class="lineno"> 1768</span><span class="comment">// backwards compatibility</span></div>
<div class="line"><a id="l01769" name="l01769"></a><span class="lineno"> 1769</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pio_sm_set_clkdiv_int_frac(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint16_t div_int, uint8_t div_frac8) {</div>
<div class="line"><a id="l01770" name="l01770"></a><span class="lineno"> 1770</span>    <a class="code hl_function" href="group__hardware__pio.html#ga14e41e953fe3a7f18e7433c57e898f92">pio_sm_set_clkdiv_int_frac8</a>(pio, sm, div_int, div_frac8);</div>
<div class="line"><a id="l01771" name="l01771"></a><span class="lineno"> 1771</span>}</div>
<div class="line"><a id="l01772" name="l01772"></a><span class="lineno"> 1772</span> </div>
<div class="line"><a id="l01780" name="l01780"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga88df92ae6a4ef3320b6565117aca885b"> 1780</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga88df92ae6a4ef3320b6565117aca885b">pio_sm_set_clkdiv</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, <span class="keywordtype">float</span> div) {</div>
<div class="line"><a id="l01781" name="l01781"></a><span class="lineno"> 1781</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01782" name="l01782"></a><span class="lineno"> 1782</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01783" name="l01783"></a><span class="lineno"> 1783</span>    uint32_t div_int;</div>
<div class="line"><a id="l01784" name="l01784"></a><span class="lineno"> 1784</span>    uint8_t div_frac8;</div>
<div class="line"><a id="l01785" name="l01785"></a><span class="lineno"> 1785</span>    pio_calculate_clkdiv8_from_float(div, &amp;div_int, &amp;div_frac8);</div>
<div class="line"><a id="l01786" name="l01786"></a><span class="lineno"> 1786</span>    <a class="code hl_function" href="group__hardware__pio.html#ga14e41e953fe3a7f18e7433c57e898f92">pio_sm_set_clkdiv_int_frac8</a>(pio, sm, div_int, div_frac8);</div>
<div class="line"><a id="l01787" name="l01787"></a><span class="lineno"> 1787</span>}</div>
<div class="line"><a id="l01788" name="l01788"></a><span class="lineno"> 1788</span> </div>
<div class="line"><a id="l01795" name="l01795"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca"> 1795</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca">pio_sm_clear_fifos</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm) {</div>
<div class="line"><a id="l01796" name="l01796"></a><span class="lineno"> 1796</span>    <span class="comment">// changing the FIFO join state clears the fifo</span></div>
<div class="line"><a id="l01797" name="l01797"></a><span class="lineno"> 1797</span>    check_pio_param(pio);</div>
<div class="line"><a id="l01798" name="l01798"></a><span class="lineno"> 1798</span>    check_sm_param(sm);</div>
<div class="line"><a id="l01799" name="l01799"></a><span class="lineno"> 1799</span>    <a class="code hl_function" href="group__hardware__base.html#ga643ecd2ac7ab82d2e1f04dba42135f2b">hw_xor_bits</a>(&amp;pio-&gt;sm[sm].shiftctrl, PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS);</div>
<div class="line"><a id="l01800" name="l01800"></a><span class="lineno"> 1800</span>    <a class="code hl_function" href="group__hardware__base.html#ga643ecd2ac7ab82d2e1f04dba42135f2b">hw_xor_bits</a>(&amp;pio-&gt;sm[sm].shiftctrl, PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS);</div>
<div class="line"><a id="l01801" name="l01801"></a><span class="lineno"> 1801</span>}</div>
<div class="line"><a id="l01802" name="l01802"></a><span class="lineno"> 1802</span> </div>
<div class="line"><a id="l01816" name="l01816"></a><span class="lineno"> 1816</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga1286f306263b413a8002c9db2b433d8b">pio_sm_set_pins</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_values);</div>
<div class="line"><a id="l01817" name="l01817"></a><span class="lineno"> 1817</span> </div>
<div class="line"><a id="l01830" name="l01830"></a><span class="lineno"> 1830</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga5eccc79bdddcebdf02371d0a68b420fd">pio_sm_set_pins64</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint64_t pin_values);</div>
<div class="line"><a id="l01831" name="l01831"></a><span class="lineno"> 1831</span> </div>
<div class="line"><a id="l01846" name="l01846"></a><span class="lineno"> 1846</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga963167ca42f67f79ec5de6b47d6027d5">pio_sm_set_pins_with_mask</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_values, uint32_t pin_mask);</div>
<div class="line"><a id="l01847" name="l01847"></a><span class="lineno"> 1847</span> </div>
<div class="line"><a id="l01861" name="l01861"></a><span class="lineno"> 1861</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga07c978498ed4a9fbc3683e48be90586e">pio_sm_set_pins_with_mask64</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint64_t pin_values, uint64_t pin_mask);</div>
<div class="line"><a id="l01862" name="l01862"></a><span class="lineno"> 1862</span> </div>
<div class="line"><a id="l01877" name="l01877"></a><span class="lineno"> 1877</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga8269f1ef4cb1e4b3b957d5f1fa6fc623">pio_sm_set_pindirs_with_mask</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint32_t pin_dirs, uint32_t pin_mask);</div>
<div class="line"><a id="l01878" name="l01878"></a><span class="lineno"> 1878</span> </div>
<div class="line"><a id="l01892" name="l01892"></a><span class="lineno"> 1892</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga4637bbb0cf6ce0d53fc45a9b017ea434">pio_sm_set_pindirs_with_mask64</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint64_t pin_dirs, uint64_t pin_mask);</div>
<div class="line"><a id="l01893" name="l01893"></a><span class="lineno"> 1893</span> </div>
<div class="line"><a id="l01909" name="l01909"></a><span class="lineno"> 1909</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#gaf5c965ef1ca21684630c8be2cf3e52e7">pio_sm_set_consecutive_pindirs</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint pins_base, uint pin_count, <span class="keywordtype">bool</span> is_out);</div>
<div class="line"><a id="l01910" name="l01910"></a><span class="lineno"> 1910</span> </div>
<div class="line"><a id="l01921" name="l01921"></a><span class="lineno"> 1921</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaa75bc8b2060929ec2b2599da8081a99b">pio_sm_claim</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm);</div>
<div class="line"><a id="l01922" name="l01922"></a><span class="lineno"> 1922</span> </div>
<div class="line"><a id="l01933" name="l01933"></a><span class="lineno"> 1933</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga4c25ad61f15a76499997102e126cbdfd">pio_claim_sm_mask</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm_mask);</div>
<div class="line"><a id="l01934" name="l01934"></a><span class="lineno"> 1934</span> </div>
<div class="line"><a id="l01943" name="l01943"></a><span class="lineno"> 1943</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#ga62328112de918932e4ed0955ce0054ab">pio_sm_unclaim</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm);</div>
<div class="line"><a id="l01944" name="l01944"></a><span class="lineno"> 1944</span> </div>
<div class="line"><a id="l01953" name="l01953"></a><span class="lineno"> 1953</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#ga604c071438065c46c9f4f21bdb61befd">pio_claim_unused_sm</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, <span class="keywordtype">bool</span> required);</div>
<div class="line"><a id="l01954" name="l01954"></a><span class="lineno"> 1954</span> </div>
<div class="line"><a id="l01964" name="l01964"></a><span class="lineno"> 1964</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#ga699fb7272e3cb5ab76a84fbf3640325d">pio_sm_is_claimed</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm);</div>
<div class="line"><a id="l01965" name="l01965"></a><span class="lineno"> 1965</span> </div>
<div class="line"><a id="l01976" name="l01976"></a><span class="lineno"> 1976</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf">pio_claim_free_sm_and_add_program</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> *pio, uint *sm, uint *offset);</div>
<div class="line"><a id="l01977" name="l01977"></a><span class="lineno"> 1977</span> </div>
<div class="line"><a id="l02000" name="l02000"></a><span class="lineno"> 2000</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__pio.html#ga53c3bbe939b3c58585d0e19ffe91e18e">pio_claim_free_sm_and_add_program_for_gpio_range</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> *pio, uint *sm, uint *offset, uint gpio_base, uint gpio_count, <span class="keywordtype">bool</span> set_gpio_base);</div>
<div class="line"><a id="l02001" name="l02001"></a><span class="lineno"> 2001</span> </div>
<div class="line"><a id="l02011" name="l02011"></a><span class="lineno"> 2011</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__pio.html#gaa8178ef68166e58260da3989bc5f06bd">pio_remove_program_and_unclaim_sm</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structpio__program.html">pio_program_t</a> *program, <a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint sm, uint offset);</div>
<div class="line"><a id="l02012" name="l02012"></a><span class="lineno"> 2012</span> </div>
<div class="line"><a id="l02020" name="l02020"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga29b350d20174699f5594fc46a35ca699"> 2020</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__pio.html#ga29b350d20174699f5594fc46a35ca699">pio_get_irq_num</a>(<a class="code hl_struct" href="structpio__hw__t.html">PIO</a> pio, uint irqn) {</div>
<div class="line"><a id="l02021" name="l02021"></a><span class="lineno"> 2021</span>    check_pio_param(pio);</div>
<div class="line"><a id="l02022" name="l02022"></a><span class="lineno"> 2022</span>    valid_params_if(HARDWARE_PIO, irqn &lt; NUM_PIO_IRQS);</div>
<div class="line"><a id="l02023" name="l02023"></a><span class="lineno"> 2023</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__pio.html#gaeb939c4541517980acf9de3ae4010624">PIO_IRQ_NUM</a>(pio, irqn);</div>
<div class="line"><a id="l02024" name="l02024"></a><span class="lineno"> 2024</span>}</div>
<div class="line"><a id="l02025" name="l02025"></a><span class="lineno"> 2025</span> </div>
<div class="line"><a id="l02032" name="l02032"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#ga89d26de56d58a6a1022dba7f21e84b4e"> 2032</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> <a class="code hl_function" href="group__hardware__pio.html#ga89d26de56d58a6a1022dba7f21e84b4e">pio_get_tx_fifo_not_full_interrupt_source</a>(uint sm) {</div>
<div class="line"><a id="l02033" name="l02033"></a><span class="lineno"> 2033</span>    check_sm_param(sm);</div>
<div class="line"><a id="l02034" name="l02034"></a><span class="lineno"> 2034</span>    <span class="keywordflow">return</span> ((<a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>)(<a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1">pis_sm0_tx_fifo_not_full</a> + sm));</div>
<div class="line"><a id="l02035" name="l02035"></a><span class="lineno"> 2035</span>}</div>
<div class="line"><a id="l02036" name="l02036"></a><span class="lineno"> 2036</span> </div>
<div class="line"><a id="l02043" name="l02043"></a><span class="lineno"><a class="line" href="group__hardware__pio.html#gad821de9c14a966fc5c16321ed5df92b4"> 2043</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a> <a class="code hl_function" href="group__hardware__pio.html#gad821de9c14a966fc5c16321ed5df92b4">pio_get_rx_fifo_not_empty_interrupt_source</a>(uint sm) {</div>
<div class="line"><a id="l02044" name="l02044"></a><span class="lineno"> 2044</span>    check_sm_param(sm);</div>
<div class="line"><a id="l02045" name="l02045"></a><span class="lineno"> 2045</span>    <span class="keywordflow">return</span> ((<a class="code hl_typedef" href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a>)(<a class="code hl_enumvalue" href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52">pis_sm0_rx_fifo_not_empty</a> + sm));</div>
<div class="line"><a id="l02046" name="l02046"></a><span class="lineno"> 2046</span>}</div>
<div class="line"><a id="l02047" name="l02047"></a><span class="lineno"> 2047</span> </div>
<div class="line"><a id="l02048" name="l02048"></a><span class="lineno"> 2048</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l02049" name="l02049"></a><span class="lineno"> 2049</span>}</div>
<div class="line"><a id="l02050" name="l02050"></a><span class="lineno"> 2050</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l02051" name="l02051"></a><span class="lineno"> 2051</span> </div>
<div class="line"><a id="l02052" name="l02052"></a><span class="lineno"> 2052</span><span class="preprocessor">#endif </span><span class="comment">// _PIO_H_</span></div>
<div class="ttc" id="aaddress__mapped_8h_html"><div class="ttname"><a href="address__mapped_8h.html">address_mapped.h</a></div></div>
<div class="ttc" id="agpio_8h_html"><div class="ttname"><a href="gpio_8h.html">gpio.h</a></div></div>
<div class="ttc" id="agroup__hardware__base_html_ga625e737a57f12211cf1f634ca5095ae4"><div class="ttname"><a href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a></div><div class="ttdeci">static __force_inline void hw_set_bits(io_rw_32 *addr, uint32_t mask)</div><div class="ttdoc">Atomically set the specified bits to 1 in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:135</div></div>
<div class="ttc" id="agroup__hardware__base_html_ga643ecd2ac7ab82d2e1f04dba42135f2b"><div class="ttname"><a href="group__hardware__base.html#ga643ecd2ac7ab82d2e1f04dba42135f2b">hw_xor_bits</a></div><div class="ttdeci">static __force_inline void hw_xor_bits(io_rw_32 *addr, uint32_t mask)</div><div class="ttdoc">Atomically flip the specified bits in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:155</div></div>
<div class="ttc" id="agroup__hardware__base_html_gafd1c089df868d987daf95870b501c2ed"><div class="ttname"><a href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a></div><div class="ttdeci">static __force_inline void hw_clear_bits(io_rw_32 *addr, uint32_t mask)</div><div class="ttdoc">Atomically clear the specified bits to 0 in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:145</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a156b1b999c6b2dd877545c8c79060a30"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a156b1b999c6b2dd877545c8c79060a30">DREQ_PIO0_TX3</a></div><div class="ttdeci">@ DREQ_PIO0_TX3</div><div class="ttdoc">Select PIO0's TX FIFO 3 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:85</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a3c22f2c9eb4a49654bba70dbc99bc893"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a3c22f2c9eb4a49654bba70dbc99bc893">DREQ_PIO1_TX0</a></div><div class="ttdeci">@ DREQ_PIO1_TX0</div><div class="ttdoc">Select PIO1's TX FIFO 0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:90</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a833bfa99e8b74de9bfc1872958a742e3"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a833bfa99e8b74de9bfc1872958a742e3">DREQ_PIO1_RX0</a></div><div class="ttdeci">@ DREQ_PIO1_RX0</div><div class="ttdoc">Select PIO1's RX FIFO 0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:94</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014aa2e360dbf123d634d08e5fae27aa29e5"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014aa2e360dbf123d634d08e5fae27aa29e5">DREQ_PIO0_TX2</a></div><div class="ttdeci">@ DREQ_PIO0_TX2</div><div class="ttdoc">Select PIO0's TX FIFO 2 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:84</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014ac4bc12d74b758a7b39c1977c401e2fe1"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ac4bc12d74b758a7b39c1977c401e2fe1">DREQ_PIO0_RX0</a></div><div class="ttdeci">@ DREQ_PIO0_RX0</div><div class="ttdoc">Select PIO0's RX FIFO 0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:86</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014ac5fedec084064e1d9ff9c6a382c1ccf8"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ac5fedec084064e1d9ff9c6a382c1ccf8">DREQ_PIO0_TX1</a></div><div class="ttdeci">@ DREQ_PIO0_TX1</div><div class="ttdoc">Select PIO0's TX FIFO 1 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:83</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ad7529b7e45af2d7eab4b740ff15b49d8">DREQ_PIO0_TX0</a></div><div class="ttdeci">@ DREQ_PIO0_TX0</div><div class="ttdoc">Select PIO0's TX FIFO 0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:82</div></div>
<div class="ttc" id="agroup__hardware__gpio_html_ga22f6b90c4c7e0013b4b5341de0a44fc4"><div class="ttname"><a href="group__hardware__gpio.html#ga22f6b90c4c7e0013b4b5341de0a44fc4">gpio_set_function</a></div><div class="ttdeci">void gpio_set_function(uint gpio, gpio_function_t fn)</div><div class="ttdoc">Select GPIO function.</div><div class="ttdef"><b>Definition:</b> gpio.c:38</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga009b3f44f112208114972c32546dfddb"><div class="ttname"><a href="group__hardware__pio.html#ga009b3f44f112208114972c32546dfddb">pio_sm_get_tx_fifo_level</a></div><div class="ttdeci">static uint pio_sm_get_tx_fifo_level(PIO pio, uint sm)</div><div class="ttdoc">Return the number of elements currently in a state machine's TX FIFO.</div><div class="ttdef"><b>Definition:</b> pio.h:1698</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga03abf744baa28e22a46fcf81452c47cf"><div class="ttname"><a href="group__hardware__pio.html#ga03abf744baa28e22a46fcf81452c47cf">pio_claim_free_sm_and_add_program</a></div><div class="ttdeci">bool pio_claim_free_sm_and_add_program(const pio_program_t *program, PIO *pio, uint *sm, uint *offset)</div><div class="ttdoc">Finds a PIO and statemachine and adds a program into PIO memory.</div><div class="ttdef"><b>Definition:</b> pio.c:395</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga06134c14db82b7927d96faeb07ab0e8b"><div class="ttname"><a href="group__hardware__pio.html#ga06134c14db82b7927d96faeb07ab0e8b">PIO_INSTANCE</a></div><div class="ttdeci">#define PIO_INSTANCE(instance)</div><div class="ttdoc">Returns the PIO instance with the given PIO number.</div><div class="ttdef"><b>Definition:</b> pio.h:188</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga06d0fd918247a86e8394afac67cf6992"><div class="ttname"><a href="group__hardware__pio.html#ga06d0fd918247a86e8394afac67cf6992">pio_set_irqn_source_enabled</a></div><div class="ttdeci">static void pio_set_irqn_source_enabled(PIO pio, uint irq_index, pio_interrupt_source_t source, bool enabled)</div><div class="ttdoc">Enable/Disable a single source on a PIO's specified (0/1) IRQ index.</div><div class="ttdef"><b>Definition:</b> pio.h:1340</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga07c978498ed4a9fbc3683e48be90586e"><div class="ttname"><a href="group__hardware__pio.html#ga07c978498ed4a9fbc3683e48be90586e">pio_sm_set_pins_with_mask64</a></div><div class="ttdeci">void pio_sm_set_pins_with_mask64(PIO pio, uint sm, uint64_t pin_values, uint64_t pin_mask)</div><div class="ttdoc">Use a state machine to set a value on multiple pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:289</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga0e60c768ea29f296b5ef40c02211bbcc"><div class="ttname"><a href="group__hardware__pio.html#ga0e60c768ea29f296b5ef40c02211bbcc">pio_interrupt_source</a></div><div class="ttdeci">pio_interrupt_source</div><div class="ttdoc">PIO interrupt source numbers for pio related IRQs.</div><div class="ttdef"><b>Definition:</b> pio.h:1245</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga12650f49c110cb1bfd8092ab67210885"><div class="ttname"><a href="group__hardware__pio.html#ga12650f49c110cb1bfd8092ab67210885">pio_sm_get_blocking</a></div><div class="ttdeci">static uint32_t pio_sm_get_blocking(PIO pio, uint sm)</div><div class="ttdoc">Read a word of data from a state machine's RX FIFO, blocking if the FIFO is empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1726</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga1286f306263b413a8002c9db2b433d8b"><div class="ttname"><a href="group__hardware__pio.html#ga1286f306263b413a8002c9db2b433d8b">pio_sm_set_pins</a></div><div class="ttdeci">void pio_sm_set_pins(PIO pio, uint sm, uint32_t pin_values)</div><div class="ttdoc">Use a state machine to set a value on all pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:221</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga12948478935f817218b64e1db3a8ebad"><div class="ttname"><a href="group__hardware__pio.html#ga12948478935f817218b64e1db3a8ebad">pio_add_program_at_offset</a></div><div class="ttdeci">int pio_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset)</div><div class="ttdoc">Attempt to load the program at the specified instruction memory offset.</div><div class="ttdef"><b>Definition:</b> pio.c:183</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga14e41e953fe3a7f18e7433c57e898f92"><div class="ttname"><a href="group__hardware__pio.html#ga14e41e953fe3a7f18e7433c57e898f92">pio_sm_set_clkdiv_int_frac8</a></div><div class="ttdeci">static void pio_sm_set_clkdiv_int_frac8(PIO pio, uint sm, uint32_t div_int, uint8_t div_frac8)</div><div class="ttdoc">set the current clock divider for a state machine using a 16:8 fraction</div><div class="ttdef"><b>Definition:</b> pio.h:1756</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga151f87205041da11d3c69be5ddbd5653"><div class="ttname"><a href="group__hardware__pio.html#ga151f87205041da11d3c69be5ddbd5653">pio_get_instance</a></div><div class="ttdeci">static PIO pio_get_instance(uint instance)</div><div class="ttdoc">Convert PIO instance to hardware instance.</div><div class="ttdef"><b>Definition:</b> pio.h:854</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga1bf1b296713b76e19b87b59b84136b2c"><div class="ttname"><a href="group__hardware__pio.html#ga1bf1b296713b76e19b87b59b84136b2c">pio_sm_exec_wait_blocking</a></div><div class="ttdeci">static void pio_sm_exec_wait_blocking(PIO pio, uint sm, uint instr)</div><div class="ttdoc">Immediately execute an instruction on a state machine and wait for it to complete.</div><div class="ttdef"><b>Definition:</b> pio.h:1449</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga28e9a84f3332ebf088f665d4b676117b"><div class="ttname"><a href="group__hardware__pio.html#ga28e9a84f3332ebf088f665d4b676117b">pio_sm_set_config</a></div><div class="ttdeci">static int pio_sm_set_config(PIO pio, uint sm, const pio_sm_config *config)</div><div class="ttdoc">Apply a state machine configuration to a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:798</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga29b350d20174699f5594fc46a35ca699"><div class="ttname"><a href="group__hardware__pio.html#ga29b350d20174699f5594fc46a35ca699">pio_get_irq_num</a></div><div class="ttdeci">static int pio_get_irq_num(PIO pio, uint irqn)</div><div class="ttdoc">Return an IRQ for a PIO hardware instance.</div><div class="ttdef"><b>Definition:</b> pio.h:2020</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga332210f0e594b24bf64f4bb1c8f49be3"><div class="ttname"><a href="group__hardware__pio.html#ga332210f0e594b24bf64f4bb1c8f49be3">pio_set_gpio_base</a></div><div class="ttdeci">int pio_set_gpio_base(PIO pio, uint gpio_base)</div><div class="ttdoc">Set the base GPIO base for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:97</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga356b3f4974cd31fdc4a2de381aceea5e"><div class="ttname"><a href="group__hardware__pio.html#ga356b3f4974cd31fdc4a2de381aceea5e">pio_mov_status_type</a></div><div class="ttdeci">pio_mov_status_type</div><div class="ttdoc">MOV status types.</div><div class="ttdef"><b>Definition:</b> pio.h:122</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga3dbf64343a2fba75549ee7b0351f7e52"><div class="ttname"><a href="group__hardware__pio.html#ga3dbf64343a2fba75549ee7b0351f7e52">pio_sm_is_tx_fifo_full</a></div><div class="ttdeci">static bool pio_sm_is_tx_fifo_full(PIO pio, uint sm)</div><div class="ttdoc">Determine if a state machine's TX FIFO is full.</div><div class="ttdef"><b>Definition:</b> pio.h:1672</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga4091eef7afda5200a3988b9412fe3b3f"><div class="ttname"><a href="group__hardware__pio.html#ga4091eef7afda5200a3988b9412fe3b3f">pio_get_dreq</a></div><div class="ttdeci">static uint pio_get_dreq(PIO pio, uint sm, bool is_tx)</div><div class="ttdoc">Return the DREQ to use for pacing transfers to/from a particular state machine FIFO.</div><div class="ttdef"><b>Definition:</b> pio.h:884</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga4369e665ee8d2db58a83eccad65c917c"><div class="ttname"><a href="group__hardware__pio.html#ga4369e665ee8d2db58a83eccad65c917c">pio_set_irq1_source_enabled</a></div><div class="ttdeci">static void pio_set_irq1_source_enabled(PIO pio, pio_interrupt_source_t source, bool enabled)</div><div class="ttdoc">Enable/Disable a single source on a PIO's IRQ 1.</div><div class="ttdef"><b>Definition:</b> pio.h:1289</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga4637bbb0cf6ce0d53fc45a9b017ea434"><div class="ttname"><a href="group__hardware__pio.html#ga4637bbb0cf6ce0d53fc45a9b017ea434">pio_sm_set_pindirs_with_mask64</a></div><div class="ttdeci">void pio_sm_set_pindirs_with_mask64(PIO pio, uint sm, uint64_t pin_dirs, uint64_t pin_mask)</div><div class="ttdoc">Use a state machine to set the pin directions for multiple pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:326</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga46af88f03a0c5abe4d55d45c5b2ccfb7"><div class="ttname"><a href="group__hardware__pio.html#ga46af88f03a0c5abe4d55d45c5b2ccfb7">pio_sm_drain_tx_fifo</a></div><div class="ttdeci">void pio_sm_drain_tx_fifo(PIO pio, uint sm)</div><div class="ttdoc">Empty out a state machine's TX FIFO.</div><div class="ttdef"><b>Definition:</b> pio.c:387</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga4c25ad61f15a76499997102e126cbdfd"><div class="ttname"><a href="group__hardware__pio.html#ga4c25ad61f15a76499997102e126cbdfd">pio_claim_sm_mask</a></div><div class="ttdeci">void pio_claim_sm_mask(PIO pio, uint sm_mask)</div><div class="ttdoc">Mark multiple state machines as used.</div><div class="ttdef"><b>Definition:</b> pio.c:36</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga53c3bbe939b3c58585d0e19ffe91e18e"><div class="ttname"><a href="group__hardware__pio.html#ga53c3bbe939b3c58585d0e19ffe91e18e">pio_claim_free_sm_and_add_program_for_gpio_range</a></div><div class="ttdeci">bool pio_claim_free_sm_and_add_program_for_gpio_range(const pio_program_t *program, PIO *pio, uint *sm, uint *offset, uint gpio_base, uint gpio_count, bool set_gpio_base)</div><div class="ttdoc">Finds a PIO and statemachine and adds a program into PIO memory.</div><div class="ttdef"><b>Definition:</b> pio.c:399</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga5eccc79bdddcebdf02371d0a68b420fd"><div class="ttname"><a href="group__hardware__pio.html#ga5eccc79bdddcebdf02371d0a68b420fd">pio_sm_set_pins64</a></div><div class="ttdeci">void pio_sm_set_pins64(PIO pio, uint sm, uint64_t pin_values)</div><div class="ttdoc">Use a state machine to set a value on all pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:252</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga604c071438065c46c9f4f21bdb61befd"><div class="ttname"><a href="group__hardware__pio.html#ga604c071438065c46c9f4f21bdb61befd">pio_claim_unused_sm</a></div><div class="ttdeci">int pio_claim_unused_sm(PIO pio, bool required)</div><div class="ttdoc">Claim a free state machine on a PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:48</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga62328112de918932e4ed0955ce0054ab"><div class="ttname"><a href="group__hardware__pio.html#ga62328112de918932e4ed0955ce0054ab">pio_sm_unclaim</a></div><div class="ttdeci">void pio_sm_unclaim(PIO pio, uint sm)</div><div class="ttdoc">Mark a state machine as no longer used.</div><div class="ttdef"><b>Definition:</b> pio.c:42</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga63e13f639ae50ee9cb8afeceba6bb118"><div class="ttname"><a href="group__hardware__pio.html#ga63e13f639ae50ee9cb8afeceba6bb118">pio_clkdiv_restart_sm_mask</a></div><div class="ttdeci">static void pio_clkdiv_restart_sm_mask(PIO pio, uint32_t mask)</div><div class="ttdoc">Restart multiple state machines' clock dividers from a phase of 0.</div><div class="ttdef"><b>Definition:</b> pio.h:1148</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga699fb7272e3cb5ab76a84fbf3640325d"><div class="ttname"><a href="group__hardware__pio.html#ga699fb7272e3cb5ab76a84fbf3640325d">pio_sm_is_claimed</a></div><div class="ttdeci">bool pio_sm_is_claimed(PIO pio, uint sm)</div><div class="ttdoc">Determine if a PIO state machine is claimed.</div><div class="ttdef"><b>Definition:</b> pio.c:57</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga6f650eb98640eac2346ff26b46dc378b"><div class="ttname"><a href="group__hardware__pio.html#ga6f650eb98640eac2346ff26b46dc378b">pio_interrupt_clear</a></div><div class="ttdeci">static void pio_interrupt_clear(PIO pio, uint pio_interrupt_num)</div><div class="ttdoc">Clear a particular PIO interrupt.</div><div class="ttdef"><b>Definition:</b> pio.h:1387</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga6fe6273d63665fdb16964790d55709fa"><div class="ttname"><a href="group__hardware__pio.html#ga6fe6273d63665fdb16964790d55709fa">pio_sm_get</a></div><div class="ttdeci">static uint32_t pio_sm_get(PIO pio, uint sm)</div><div class="ttdoc">Read a word of data from a state machine's RX FIFO.</div><div class="ttdef"><b>Definition:</b> pio.h:1618</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga71e388315eb6a77a6560b77ec13145a4"><div class="ttname"><a href="group__hardware__pio.html#ga71e388315eb6a77a6560b77ec13145a4">pio_sm_is_rx_fifo_full</a></div><div class="ttdeci">static bool pio_sm_is_rx_fifo_full(PIO pio, uint sm)</div><div class="ttdoc">Determine if a state machine's RX FIFO is full.</div><div class="ttdef"><b>Definition:</b> pio.h:1631</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga74a681208957ab2bc8c8aafff9bb9f7c"><div class="ttname"><a href="group__hardware__pio.html#ga74a681208957ab2bc8c8aafff9bb9f7c">pio_sm_set_wrap</a></div><div class="ttdeci">static void pio_sm_set_wrap(PIO pio, uint sm, uint wrap_target, uint wrap)</div><div class="ttdoc">Set the current wrap configuration for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1465</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga79fcbff988c01df8285f05ce6ad3a86d"><div class="ttname"><a href="group__hardware__pio.html#ga79fcbff988c01df8285f05ce6ad3a86d">PIO_NUM</a></div><div class="ttdeci">#define PIO_NUM(pio)</div><div class="ttdoc">Returns the PIO number for a PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:175</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga7b89b93dd0553c77538c70baf6a7e4f0"><div class="ttname"><a href="group__hardware__pio.html#ga7b89b93dd0553c77538c70baf6a7e4f0">pio_sm_restart</a></div><div class="ttdeci">static void pio_sm_restart(PIO pio, uint sm)</div><div class="ttdoc">Restart a state machine with a known state.</div><div class="ttdef"><b>Definition:</b> pio.h:1071</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga7d415b966abbc1c25315d0775d093356"><div class="ttname"><a href="group__hardware__pio.html#ga7d415b966abbc1c25315d0775d093356">pio_fifo_join</a></div><div class="ttdeci">pio_fifo_join</div><div class="ttdoc">FIFO join states.</div><div class="ttdef"><b>Definition:</b> pio.h:108</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga7f0190e662c5b6e24d91044b42010ffc"><div class="ttname"><a href="group__hardware__pio.html#ga7f0190e662c5b6e24d91044b42010ffc">pio_sm_set_out_pins</a></div><div class="ttdeci">static void pio_sm_set_out_pins(PIO pio, uint sm, uint out_base, uint out_count)</div><div class="ttdoc">Set the current 'out' pins for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1486</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga800d8949b5d04dfe635d4c12241f0cd2"><div class="ttname"><a href="group__hardware__pio.html#ga800d8949b5d04dfe635d4c12241f0cd2">pio_sm_exec</a></div><div class="ttdeci">static void pio_sm_exec(PIO pio, uint sm, uint instr)</div><div class="ttdoc">Immediately execute an instruction on a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1418</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga81259bc71fd3bd81b96e47f9f4ea7b67"><div class="ttname"><a href="group__hardware__pio.html#ga81259bc71fd3bd81b96e47f9f4ea7b67">pio_set_irq0_source_mask_enabled</a></div><div class="ttdeci">static void pio_set_irq0_source_mask_enabled(PIO pio, uint32_t source_mask, bool enabled)</div><div class="ttdoc">Enable/Disable multiple sources on a PIO's IRQ 0.</div><div class="ttdef"><b>Definition:</b> pio.h:1305</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga81c77d31aff72655977b658a9c37665e"><div class="ttname"><a href="group__hardware__pio.html#ga81c77d31aff72655977b658a9c37665e">pio_remove_program</a></div><div class="ttdeci">void pio_remove_program(PIO pio, const pio_program_t *program, uint loaded_offset)</div><div class="ttdoc">Remove a program from a PIO instance's instruction memory.</div><div class="ttdef"><b>Definition:</b> pio.c:190</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga8269f1ef4cb1e4b3b957d5f1fa6fc623"><div class="ttname"><a href="group__hardware__pio.html#ga8269f1ef4cb1e4b3b957d5f1fa6fc623">pio_sm_set_pindirs_with_mask</a></div><div class="ttdeci">void pio_sm_set_pindirs_with_mask(PIO pio, uint sm, uint32_t pin_dirs, uint32_t pin_mask)</div><div class="ttdoc">Use a state machine to set the pin directions for multiple pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:298</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga850396a2a2925bbcc97247a629ca5bd2"><div class="ttname"><a href="group__hardware__pio.html#ga850396a2a2925bbcc97247a629ca5bd2">pio_clear_instruction_memory</a></div><div class="ttdeci">void pio_clear_instruction_memory(PIO pio)</div><div class="ttdoc">Clears all of a PIO instance's instruction memory.</div><div class="ttdef"><b>Definition:</b> pio.c:199</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga87cb36afe5783e2e92bf528b1d50ea07"><div class="ttname"><a href="group__hardware__pio.html#ga87cb36afe5783e2e92bf528b1d50ea07">pio_sm_set_sideset_pins</a></div><div class="ttdeci">static void pio_sm_set_sideset_pins(PIO pio, uint sm, uint sideset_base)</div><div class="ttdoc">Set the current 'sideset' pins for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1552</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga88df92ae6a4ef3320b6565117aca885b"><div class="ttname"><a href="group__hardware__pio.html#ga88df92ae6a4ef3320b6565117aca885b">pio_sm_set_clkdiv</a></div><div class="ttdeci">static void pio_sm_set_clkdiv(PIO pio, uint sm, float div)</div><div class="ttdoc">set the current clock divider for a state machine</div><div class="ttdef"><b>Definition:</b> pio.h:1780</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga89688fd1a941797cb0cc80dbbc4bbd5f"><div class="ttname"><a href="group__hardware__pio.html#ga89688fd1a941797cb0cc80dbbc4bbd5f">pio_get_gpio_base</a></div><div class="ttdeci">static uint pio_get_gpio_base(PIO pio)</div><div class="ttdoc">Return the base GPIO base for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:769</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga89d26de56d58a6a1022dba7f21e84b4e"><div class="ttname"><a href="group__hardware__pio.html#ga89d26de56d58a6a1022dba7f21e84b4e">pio_get_tx_fifo_not_full_interrupt_source</a></div><div class="ttdeci">static pio_interrupt_source_t pio_get_tx_fifo_not_full_interrupt_source(uint sm)</div><div class="ttdoc">Return the interrupt source for a state machines TX FIFO not full interrupt.</div><div class="ttdef"><b>Definition:</b> pio.h:2032</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga8fa0b87fde0db10be2934de542f9d6c2"><div class="ttname"><a href="group__hardware__pio.html#ga8fa0b87fde0db10be2934de542f9d6c2">pio_sm_get_rx_fifo_level</a></div><div class="ttdeci">static uint pio_sm_get_rx_fifo_level(PIO pio, uint sm)</div><div class="ttdoc">Return the number of elements currently in a state machine's RX FIFO.</div><div class="ttdef"><b>Definition:</b> pio.h:1657</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga916d05e71da7f2173cd22b46bbfa0a11"><div class="ttname"><a href="group__hardware__pio.html#ga916d05e71da7f2173cd22b46bbfa0a11">pio0</a></div><div class="ttdeci">#define pio0</div><div class="ttdef"><b>Definition:</b> pio.h:138</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga923a261ba19804c404900228e99c9522"><div class="ttname"><a href="group__hardware__pio.html#ga923a261ba19804c404900228e99c9522">pio1</a></div><div class="ttdeci">#define pio1</div><div class="ttdef"><b>Definition:</b> pio.h:146</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga963167ca42f67f79ec5de6b47d6027d5"><div class="ttname"><a href="group__hardware__pio.html#ga963167ca42f67f79ec5de6b47d6027d5">pio_sm_set_pins_with_mask</a></div><div class="ttdeci">void pio_sm_set_pins_with_mask(PIO pio, uint sm, uint32_t pin_values, uint32_t pin_mask)</div><div class="ttdoc">Use a state machine to set a value on multiple pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:261</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga97b135c9016b91fbf237c93313d25fd4"><div class="ttname"><a href="group__hardware__pio.html#ga97b135c9016b91fbf237c93313d25fd4">pio_sm_set_jmp_pin</a></div><div class="ttdeci">static void pio_sm_set_jmp_pin(PIO pio, uint sm, uint pin)</div><div class="ttdoc">Set the 'jmp' pin for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1571</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga9c0ea409da4fcb98586120b575921c31"><div class="ttname"><a href="group__hardware__pio.html#ga9c0ea409da4fcb98586120b575921c31">pio_sm_get_pc</a></div><div class="ttdeci">static uint8_t pio_sm_get_pc(PIO pio, uint sm)</div><div class="ttdoc">Return the current program counter for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1400</div></div>
<div class="ttc" id="agroup__hardware__pio_html_ga9e150bfd3d43565a01f38a37fa2884d4"><div class="ttname"><a href="group__hardware__pio.html#ga9e150bfd3d43565a01f38a37fa2884d4">pio_get_funcsel</a></div><div class="ttdeci">static uint pio_get_funcsel(PIO pio)</div><div class="ttdoc">Return the funcsel number of a PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:843</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa26de7b3ef34fb86138bf376ab152577"><div class="ttname"><a href="group__hardware__pio.html#gaa26de7b3ef34fb86138bf376ab152577">PIO_FUNCSEL_NUM</a></div><div class="ttdeci">#define PIO_FUNCSEL_NUM(pio, gpio)</div><div class="ttdoc">Returns gpio_function_t needed to select the PIO function for the given PIO instance on the given GPI...</div><div class="ttdef"><b>Definition:</b> pio.h:200</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa47ec4090dcdc251e44bf4e4cb89a7bc"><div class="ttname"><a href="group__hardware__pio.html#gaa47ec4090dcdc251e44bf4e4cb89a7bc">pio_sm_set_enabled</a></div><div class="ttdeci">static void pio_sm_set_enabled(PIO pio, uint sm, bool enabled)</div><div class="ttdoc">Enable or disable a PIO state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1009</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa75bc8b2060929ec2b2599da8081a99b"><div class="ttname"><a href="group__hardware__pio.html#gaa75bc8b2060929ec2b2599da8081a99b">pio_sm_claim</a></div><div class="ttdeci">void pio_sm_claim(PIO pio, uint sm)</div><div class="ttdoc">Mark a state machine as used.</div><div class="ttdef"><b>Definition:</b> pio.c:24</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa8178ef68166e58260da3989bc5f06bd"><div class="ttname"><a href="group__hardware__pio.html#gaa8178ef68166e58260da3989bc5f06bd">pio_remove_program_and_unclaim_sm</a></div><div class="ttdeci">void pio_remove_program_and_unclaim_sm(const pio_program_t *program, PIO pio, uint sm, uint offset)</div><div class="ttdoc">Removes a program from PIO memory and unclaims the state machine.</div><div class="ttdef"><b>Definition:</b> pio.c:455</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa8aafe966a46f4de9be59f73cae65a4b"><div class="ttname"><a href="group__hardware__pio.html#gaa8aafe966a46f4de9be59f73cae65a4b">pio_can_add_program</a></div><div class="ttdeci">bool pio_can_add_program(PIO pio, const pio_program_t *program)</div><div class="ttdoc">Determine whether the given program can (at the time of the call) be loaded onto the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:145</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaa92c20b2d08f3b8a6bc35cd602a092e4"><div class="ttname"><a href="group__hardware__pio.html#gaa92c20b2d08f3b8a6bc35cd602a092e4">pio_interrupt_get</a></div><div class="ttdeci">static bool pio_interrupt_get(PIO pio, uint pio_interrupt_num)</div><div class="ttdoc">Determine if a particular PIO interrupt is set.</div><div class="ttdef"><b>Definition:</b> pio.h:1375</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaaa44e504a2abd8ca2c1ee2db91d0652b"><div class="ttname"><a href="group__hardware__pio.html#gaaa44e504a2abd8ca2c1ee2db91d0652b">pio_sm_is_exec_stalled</a></div><div class="ttdeci">static bool pio_sm_is_exec_stalled(PIO pio, uint sm)</div><div class="ttdoc">Determine if an instruction set by pio_sm_exec() is stalled executing.</div><div class="ttdef"><b>Definition:</b> pio.h:1431</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaafac789d94b0727bb02ea83a8786897f"><div class="ttname"><a href="group__hardware__pio.html#gaafac789d94b0727bb02ea83a8786897f">pio_can_add_program_at_offset</a></div><div class="ttdeci">bool pio_can_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset)</div><div class="ttdoc">Determine whether the given program can (at the time of the call) be loaded onto the PIO instance sta...</div><div class="ttdef"><b>Definition:</b> pio.c:153</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gab48b30da795dcd73b4a998d67a4af235"><div class="ttname"><a href="group__hardware__pio.html#gab48b30da795dcd73b4a998d67a4af235">pio_sm_put</a></div><div class="ttdeci">static void pio_sm_put(PIO pio, uint sm, uint32_t data)</div><div class="ttdoc">Write a word of data to a state machine's TX FIFO.</div><div class="ttdef"><b>Definition:</b> pio.h:1597</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gab4cb36e85ee8807b51fd03021adff9ca"><div class="ttname"><a href="group__hardware__pio.html#gab4cb36e85ee8807b51fd03021adff9ca">pio_sm_clear_fifos</a></div><div class="ttdeci">static void pio_sm_clear_fifos(PIO pio, uint sm)</div><div class="ttdoc">Clear a state machine's TX and RX FIFOs.</div><div class="ttdef"><b>Definition:</b> pio.h:1795</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gab9e9aed4bb165a040415ae342e0902fe"><div class="ttname"><a href="group__hardware__pio.html#gab9e9aed4bb165a040415ae342e0902fe">pio_interrupt_source_t</a></div><div class="ttdeci">enum pio_interrupt_source pio_interrupt_source_t</div><div class="ttdoc">PIO interrupt source numbers for pio related IRQs.</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gab9eca729acb2cebdb1abb7793d0f5bdf"><div class="ttname"><a href="group__hardware__pio.html#gab9eca729acb2cebdb1abb7793d0f5bdf">PIO_DREQ_NUM</a></div><div class="ttdeci">#define PIO_DREQ_NUM(pio, sm, is_tx)</div><div class="ttdoc">Returns the dreq_num_t used for pacing DMA transfers to or from a given state machine's FIFOs on this...</div><div class="ttdef"><b>Definition:</b> pio.h:218</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gac3797a9f7e80606152eb44af9ca96398"><div class="ttname"><a href="group__hardware__pio.html#gac3797a9f7e80606152eb44af9ca96398">pio_enable_sm_mask_in_sync</a></div><div class="ttdeci">static void pio_enable_sm_mask_in_sync(PIO pio, uint32_t mask)</div><div class="ttdoc">Enable multiple PIO state machines synchronizing their clock dividers.</div><div class="ttdef"><b>Definition:</b> pio.h:1207</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gacaf6ee284dc834fbb742d1eef6180e6c"><div class="ttname"><a href="group__hardware__pio.html#gacaf6ee284dc834fbb742d1eef6180e6c">pio_sm_set_set_pins</a></div><div class="ttdeci">static void pio_sm_set_set_pins(PIO pio, uint sm, uint set_base, uint set_count)</div><div class="ttdoc">Set the current 'set' pins for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1510</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gacd981b2206b02eb1c4573a0f328d7819"><div class="ttname"><a href="group__hardware__pio.html#gacd981b2206b02eb1c4573a0f328d7819">pio_sm_clkdiv_restart</a></div><div class="ttdeci">static void pio_sm_clkdiv_restart(PIO pio, uint sm)</div><div class="ttdoc">Restart a state machine's clock divider from a phase of 0.</div><div class="ttdef"><b>Definition:</b> pio.h:1113</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gad821de9c14a966fc5c16321ed5df92b4"><div class="ttname"><a href="group__hardware__pio.html#gad821de9c14a966fc5c16321ed5df92b4">pio_get_rx_fifo_not_empty_interrupt_source</a></div><div class="ttdeci">static pio_interrupt_source_t pio_get_rx_fifo_not_empty_interrupt_source(uint sm)</div><div class="ttdoc">Return the interrupt source for a state machines RX FIFO not empty interrupt.</div><div class="ttdef"><b>Definition:</b> pio.h:2043</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gadf404ba44b7f83e79fd6b57b3e2c89df"><div class="ttname"><a href="group__hardware__pio.html#gadf404ba44b7f83e79fd6b57b3e2c89df">pio_sm_is_rx_fifo_empty</a></div><div class="ttdeci">static bool pio_sm_is_rx_fifo_empty(PIO pio, uint sm)</div><div class="ttdoc">Determine if a state machine's RX FIFO is empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1644</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gadf4ae3f4a334c1dcac1b62b148508bf2"><div class="ttname"><a href="group__hardware__pio.html#gadf4ae3f4a334c1dcac1b62b148508bf2">pio_sm_is_tx_fifo_empty</a></div><div class="ttdeci">static bool pio_sm_is_tx_fifo_empty(PIO pio, uint sm)</div><div class="ttdoc">Determine if a state machine's TX FIFO is empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1685</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gae39150dd6910d2776484526059911b79"><div class="ttname"><a href="group__hardware__pio.html#gae39150dd6910d2776484526059911b79">pio_set_irq1_source_mask_enabled</a></div><div class="ttdeci">static void pio_set_irq1_source_mask_enabled(PIO pio, uint32_t source_mask, bool enabled)</div><div class="ttdoc">Enable/Disable multiple sources on a PIO's IRQ 1.</div><div class="ttdef"><b>Definition:</b> pio.h:1322</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gae3e115fd41d9ac29c7a13b0c213bc2cd"><div class="ttname"><a href="group__hardware__pio.html#gae3e115fd41d9ac29c7a13b0c213bc2cd">pio_restart_sm_mask</a></div><div class="ttdeci">static void pio_restart_sm_mask(PIO pio, uint32_t mask)</div><div class="ttdoc">Restart multiple state machine with a known state.</div><div class="ttdef"><b>Definition:</b> pio.h:1086</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gae86f691914b78d66b1394ae94f3f4aa6"><div class="ttname"><a href="group__hardware__pio.html#gae86f691914b78d66b1394ae94f3f4aa6">pio_get_index</a></div><div class="ttdeci">static uint pio_get_index(PIO pio)</div><div class="ttdoc">Return the instance number of a PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:831</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaeb939c4541517980acf9de3ae4010624"><div class="ttname"><a href="group__hardware__pio.html#gaeb939c4541517980acf9de3ae4010624">PIO_IRQ_NUM</a></div><div class="ttdeci">#define PIO_IRQ_NUM(pio, irqn)</div><div class="ttdoc">Returns the irq_num_t for processor interrupts from the given PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:230</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaee8bfc3409cb8d93cccdeda3961bc377"><div class="ttname"><a href="group__hardware__pio.html#gaee8bfc3409cb8d93cccdeda3961bc377">pio_sm_put_blocking</a></div><div class="ttdeci">static void pio_sm_put_blocking(PIO pio, uint sm, uint32_t data)</div><div class="ttdoc">Write a word of data to a state machine's TX FIFO, blocking if the FIFO is full.</div><div class="ttdef"><b>Definition:</b> pio.h:1713</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaef50ef92f7ea0666dffe939c0b3fd24c"><div class="ttname"><a href="group__hardware__pio.html#gaef50ef92f7ea0666dffe939c0b3fd24c">pio_sm_set_in_pins</a></div><div class="ttdeci">static void pio_sm_set_in_pins(PIO pio, uint sm, uint in_base)</div><div class="ttdoc">Set the current 'in' pins for a state machine.</div><div class="ttdef"><b>Definition:</b> pio.h:1532</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaefbd086e8e96fee073438dac3c20334c"><div class="ttname"><a href="group__hardware__pio.html#gaefbd086e8e96fee073438dac3c20334c">pio_add_program</a></div><div class="ttdeci">int pio_add_program(PIO pio, const pio_program_t *program)</div><div class="ttdoc">Attempt to load the program.</div><div class="ttdef"><b>Definition:</b> pio.c:173</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaf5c965ef1ca21684630c8be2cf3e52e7"><div class="ttname"><a href="group__hardware__pio.html#gaf5c965ef1ca21684630c8be2cf3e52e7">pio_sm_set_consecutive_pindirs</a></div><div class="ttdeci">int pio_sm_set_consecutive_pindirs(PIO pio, uint sm, uint pins_base, uint pin_count, bool is_out)</div><div class="ttdoc">Use a state machine to set the same pin direction for multiple consecutive pins for the PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.c:334</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gaf726f77ee21f5373cadf064a4e0b4935"><div class="ttname"><a href="group__hardware__pio.html#gaf726f77ee21f5373cadf064a4e0b4935">pio_set_sm_mask_enabled</a></div><div class="ttdeci">static void pio_set_sm_mask_enabled(PIO pio, uint32_t mask, bool enabled)</div><div class="ttdoc">Enable or disable multiple PIO state machines.</div><div class="ttdef"><b>Definition:</b> pio.h:1028</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gafa244b1be8f53a329db9d26298e054bb"><div class="ttname"><a href="group__hardware__pio.html#gafa244b1be8f53a329db9d26298e054bb">pio_gpio_init</a></div><div class="ttdeci">static void pio_gpio_init(PIO pio, uint pin)</div><div class="ttdoc">Setup the function select for a GPIO to use output from the given PIO instance.</div><div class="ttdef"><b>Definition:</b> pio.h:871</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gafc173eb3cb980ed3c823384e42e265bb"><div class="ttname"><a href="group__hardware__pio.html#gafc173eb3cb980ed3c823384e42e265bb">pio_set_irqn_source_mask_enabled</a></div><div class="ttdeci">static void pio_set_irqn_source_mask_enabled(PIO pio, uint irq_index, uint32_t source_mask, bool enabled)</div><div class="ttdoc">Enable/Disable multiple sources on a PIO's specified (0/1) IRQ index.</div><div class="ttdef"><b>Definition:</b> pio.h:1357</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gafe39a664c508e08ef4c74b7c3c38bc07"><div class="ttname"><a href="group__hardware__pio.html#gafe39a664c508e08ef4c74b7c3c38bc07">pio_set_irq0_source_enabled</a></div><div class="ttdeci">static void pio_set_irq0_source_enabled(PIO pio, pio_interrupt_source_t source, bool enabled)</div><div class="ttdoc">Enable/Disable a single source on a PIO's IRQ 0.</div><div class="ttdef"><b>Definition:</b> pio.h:1273</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca066e1cafa42ed6638c93cc09c9b1a0d4">pis_interrupt2</a></div><div class="ttdeci">@ pis_interrupt2</div><div class="ttdoc">PIO interrupt 2 is raised.</div><div class="ttdef"><b>Definition:</b> pio.h:1248</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca214d3bdb6ebc516c4094c4eb476d514d">pis_sm2_tx_fifo_not_full</a></div><div class="ttdeci">@ pis_sm2_tx_fifo_not_full</div><div class="ttdoc">State machine 2 TX FIFO is not full.</div><div class="ttdef"><b>Definition:</b> pio.h:1258</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca23610bee821f3f8fecbfad0e48c6d742">pis_interrupt0</a></div><div class="ttdeci">@ pis_interrupt0</div><div class="ttdoc">PIO interrupt 0 is raised.</div><div class="ttdef"><b>Definition:</b> pio.h:1246</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca27452b43a8d5d40ab0ba25a195681d48">pis_sm1_tx_fifo_not_full</a></div><div class="ttdeci">@ pis_sm1_tx_fifo_not_full</div><div class="ttdoc">State machine 1 TX FIFO is not full.</div><div class="ttdef"><b>Definition:</b> pio.h:1257</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca463c09bec3151921a18be2c548e97297">pis_sm3_tx_fifo_not_full</a></div><div class="ttdeci">@ pis_sm3_tx_fifo_not_full</div><div class="ttdoc">State machine 3 TX FIFO is not full.</div><div class="ttdef"><b>Definition:</b> pio.h:1259</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6cd394d2b05ae5eec188d5283d16dc49">pis_interrupt1</a></div><div class="ttdeci">@ pis_interrupt1</div><div class="ttdoc">PIO interrupt 1 is raised.</div><div class="ttdef"><b>Definition:</b> pio.h:1247</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca6d7f4a904cb634fd3f30f033874393ac">pis_sm2_rx_fifo_not_empty</a></div><div class="ttdeci">@ pis_sm2_rx_fifo_not_empty</div><div class="ttdoc">State machine 2 RX FIFO is not empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1262</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca85ee2774a8e5dfaf61d3866a81cb381c">pis_sm1_rx_fifo_not_empty</a></div><div class="ttdeci">@ pis_sm1_rx_fifo_not_empty</div><div class="ttdoc">State machine 1 RX FIFO is not empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1261</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca924b2a1d4b6d257ac13608729dcf9ee1">pis_sm0_tx_fifo_not_full</a></div><div class="ttdeci">@ pis_sm0_tx_fifo_not_full</div><div class="ttdoc">State machine 0 TX FIFO is not full.</div><div class="ttdef"><b>Definition:</b> pio.h:1256</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca94cf23106019a84873d6db52d1e8470f">pis_interrupt3</a></div><div class="ttdeci">@ pis_interrupt3</div><div class="ttdoc">PIO interrupt 3 is raised.</div><div class="ttdef"><b>Definition:</b> pio.h:1249</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbcca959e0b9e484719a0af543fb87a365d52">pis_sm0_rx_fifo_not_empty</a></div><div class="ttdeci">@ pis_sm0_rx_fifo_not_empty</div><div class="ttdoc">State machine 0 RX FIFO is not empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1260</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698"><div class="ttname"><a href="group__hardware__pio.html#gga0e60c768ea29f296b5ef40c02211bbccaacce0dbc391b9bb05965b7bc1b6f7698">pis_sm3_rx_fifo_not_empty</a></div><div class="ttdeci">@ pis_sm3_rx_fifo_not_empty</div><div class="ttdoc">State machine 3 RX FIFO is not empty.</div><div class="ttdef"><b>Definition:</b> pio.h:1263</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4"><div class="ttname"><a href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a1ecaeaf5a3d81338a276b30f019b05c4">PIO_FIFO_JOIN_NONE</a></div><div class="ttdeci">@ PIO_FIFO_JOIN_NONE</div><div class="ttdoc">TX FIFO length=4 is used for transmit, RX FIFO length=4 is used for receive.</div><div class="ttdef"><b>Definition:</b> pio.h:109</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50"><div class="ttname"><a href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356a22a2cbf467019804e134a38d40249f50">PIO_FIFO_JOIN_TX</a></div><div class="ttdeci">@ PIO_FIFO_JOIN_TX</div><div class="ttdoc">TX FIFO length=8 is used for transmit, RX FIFO is disabled.</div><div class="ttdef"><b>Definition:</b> pio.h:110</div></div>
<div class="ttc" id="agroup__hardware__pio_html_gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0"><div class="ttname"><a href="group__hardware__pio.html#gga7d415b966abbc1c25315d0775d093356ab2cff7409baac4928fec469fe5b44ed0">PIO_FIFO_JOIN_RX</a></div><div class="ttdeci">@ PIO_FIFO_JOIN_RX</div><div class="ttdoc">RX FIFO length=8 is used for receive, TX FIFO is disabled.</div><div class="ttdef"><b>Definition:</b> pio.h:111</div></div>
<div class="ttc" id="agroup__pico__base_html_ggaddcb20bc9a61ceff479aa87369a862aaa9b50bcb755cf2e8295de9ffa52b252fd"><div class="ttname"><a href="group__pico__base.html#ggaddcb20bc9a61ceff479aa87369a862aaa9b50bcb755cf2e8295de9ffa52b252fd">PICO_OK</a></div><div class="ttdeci">@ PICO_OK</div><div class="ttdoc">No error; the operation succeeded.</div><div class="ttdef"><b>Definition:</b> error.h:23</div></div>
<div class="ttc" id="agroup__pico__base_html_ggaddcb20bc9a61ceff479aa87369a862aaac86a6335326022a1ff4d1cd8aad4bb69"><div class="ttname"><a href="group__pico__base.html#ggaddcb20bc9a61ceff479aa87369a862aaac86a6335326022a1ff4d1cd8aad4bb69">PICO_ERROR_BAD_ALIGNMENT</a></div><div class="ttdeci">@ PICO_ERROR_BAD_ALIGNMENT</div><div class="ttdoc">Address was mis-aligned (usually not on word boundary)</div><div class="ttdef"><b>Definition:</b> error.h:35</div></div>
<div class="ttc" id="agroup__pico__platform_html_gab0d1ba75ceb64131e19f613d7a5313c9"><div class="ttname"><a href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a></div><div class="ttdeci">static __force_inline void tight_loop_contents(void)</div><div class="ttdoc">No-op function for the body of tight loops.</div><div class="ttdef"><b>Definition:</b> platform.h:80</div></div>
<div class="ttc" id="agroup__sm__config_html_ga1dbca28933c083592e6e359effe250bf"><div class="ttname"><a href="group__sm__config.html#ga1dbca28933c083592e6e359effe250bf">sm_config_set_out_pin_base</a></div><div class="ttdeci">static void sm_config_set_out_pin_base(pio_sm_config *c, uint out_base)</div><div class="ttdoc">Set the base of the 'out' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:334</div></div>
<div class="ttc" id="agroup__sm__config_html_ga20366467e0cddab87a797459a53880e9"><div class="ttname"><a href="group__sm__config.html#ga20366467e0cddab87a797459a53880e9">sm_config_set_out_special</a></div><div class="ttdeci">static void sm_config_set_out_special(pio_sm_config *c, bool sticky, bool has_enable_pin, uint enable_bit_index)</div><div class="ttdoc">Set special 'out' operations in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:699</div></div>
<div class="ttc" id="agroup__sm__config_html_ga40d4807c0665d30ceab153b7444560eb"><div class="ttname"><a href="group__sm__config.html#ga40d4807c0665d30ceab153b7444560eb">sm_config_set_set_pin_base</a></div><div class="ttdeci">static void sm_config_set_set_pin_base(pio_sm_config *c, uint set_base)</div><div class="ttdoc">Set the base of the 'set' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:380</div></div>
<div class="ttc" id="agroup__sm__config_html_ga441e87022f2178c1c57d509da4aacb75"><div class="ttname"><a href="group__sm__config.html#ga441e87022f2178c1c57d509da4aacb75">sm_config_set_in_pin_count</a></div><div class="ttdeci">static void sm_config_set_in_pin_count(pio_sm_config *c, uint in_count)</div><div class="ttdoc">Set the count of 'in' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:461</div></div>
<div class="ttc" id="agroup__sm__config_html_ga613bed03e10e569f1b7aede74d40a5b5"><div class="ttname"><a href="group__sm__config.html#ga613bed03e10e569f1b7aede74d40a5b5">sm_config_set_out_shift</a></div><div class="ttdeci">static void sm_config_set_out_shift(pio_sm_config *c, bool shift_right, bool autopull, uint pull_threshold)</div><div class="ttdoc">Setup 'out' shifting parameters in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:657</div></div>
<div class="ttc" id="agroup__sm__config_html_ga78e129fe383f2af0fc5e1448dea4c3d6"><div class="ttname"><a href="group__sm__config.html#ga78e129fe383f2af0fc5e1448dea4c3d6">sm_config_set_set_pin_count</a></div><div class="ttdeci">static void sm_config_set_set_pin_count(pio_sm_config *c, uint set_count)</div><div class="ttdoc">Set the count of 'set' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:398</div></div>
<div class="ttc" id="agroup__sm__config_html_ga7abfda1f60c62565d5b13536b0605af7"><div class="ttname"><a href="group__sm__config.html#ga7abfda1f60c62565d5b13536b0605af7">sm_config_set_sideset_pin_base</a></div><div class="ttdeci">static void sm_config_set_sideset_pin_base(pio_sm_config *c, uint sideset_base)</div><div class="ttdoc">Set the base of the 'sideset' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:481</div></div>
<div class="ttc" id="agroup__sm__config_html_ga8b819db1095ffdf4477ab114f2f1b362"><div class="ttname"><a href="group__sm__config.html#ga8b819db1095ffdf4477ab114f2f1b362">sm_config_set_clkdiv_int_frac8</a></div><div class="ttdeci">static void sm_config_set_clkdiv_int_frac8(pio_sm_config *c, uint32_t div_int, uint8_t div_frac8)</div><div class="ttdoc">Set the state machine clock divider (from integer and fractional parts - 16:8) in a state machine con...</div><div class="ttdef"><b>Definition:</b> pio.h:537</div></div>
<div class="ttc" id="agroup__sm__config_html_gaaf804a05a2ebaa127d0d216b3d4e3e80"><div class="ttname"><a href="group__sm__config.html#gaaf804a05a2ebaa127d0d216b3d4e3e80">sm_config_set_in_pin_base</a></div><div class="ttdeci">static void sm_config_set_in_pin_base(pio_sm_config *c, uint in_base)</div><div class="ttdoc">Set the base of the 'in' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:426</div></div>
<div class="ttc" id="agroup__sm__config_html_gac418400e30520ea3961d8977c180a4f9"><div class="ttname"><a href="group__sm__config.html#gac418400e30520ea3961d8977c180a4f9">sm_config_set_in_pins</a></div><div class="ttdeci">static void sm_config_set_in_pins(pio_sm_config *c, uint in_base)</div><div class="ttdoc">Set the base for the 'in' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:444</div></div>
<div class="ttc" id="agroup__sm__config_html_gacd24870944ce2f00f3f7847bb3e5d543"><div class="ttname"><a href="group__sm__config.html#gacd24870944ce2f00f3f7847bb3e5d543">sm_config_set_mov_status</a></div><div class="ttdeci">static void sm_config_set_mov_status(pio_sm_config *c, enum pio_mov_status_type status_sel, uint status_n)</div><div class="ttdoc">Set source for 'mov status' in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:715</div></div>
<div class="ttc" id="agroup__sm__config_html_gad55bf8b410fa1d13bd1bd020587e01d7"><div class="ttname"><a href="group__sm__config.html#gad55bf8b410fa1d13bd1bd020587e01d7">sm_config_set_sideset_pins</a></div><div class="ttdeci">static void sm_config_set_sideset_pins(pio_sm_config *c, uint sideset_base)</div><div class="ttdoc">Set the 'sideset' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:502</div></div>
<div class="ttc" id="agroup__sm__config_html_gada1dff2c00b7d3a1cf722880c8373424"><div class="ttname"><a href="group__sm__config.html#gada1dff2c00b7d3a1cf722880c8373424">sm_config_set_set_pins</a></div><div class="ttdeci">static void sm_config_set_set_pins(pio_sm_config *c, uint set_base, uint set_count)</div><div class="ttdoc">Set the 'set' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:413</div></div>
<div class="ttc" id="agroup__sm__config_html_gade3d072e319fc7d10bec180a9692ea89"><div class="ttname"><a href="group__sm__config.html#gade3d072e319fc7d10bec180a9692ea89">sm_config_set_out_pin_count</a></div><div class="ttdeci">static void sm_config_set_out_pin_count(pio_sm_config *c, uint out_count)</div><div class="ttdoc">Set the number of 'out' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:352</div></div>
<div class="ttc" id="agroup__sm__config_html_gae8c09c7a4372da95ad777faae51c5a24"><div class="ttname"><a href="group__sm__config.html#gae8c09c7a4372da95ad777faae51c5a24">sm_config_set_clkdiv</a></div><div class="ttdeci">static void sm_config_set_clkdiv(pio_sm_config *c, float div)</div><div class="ttdoc">Set the state machine clock divider (from a floating point value) in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:591</div></div>
<div class="ttc" id="agroup__sm__config_html_gaed7a6e7dc4f1979c7c62e4773df8c79b"><div class="ttname"><a href="group__sm__config.html#gaed7a6e7dc4f1979c7c62e4773df8c79b">sm_config_set_in_shift</a></div><div class="ttdeci">static void sm_config_set_in_shift(pio_sm_config *c, bool shift_right, bool autopush, uint push_threshold)</div><div class="ttdoc">Setup 'in' shifting parameters in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:638</div></div>
<div class="ttc" id="agroup__sm__config_html_gaf2bfc66d6427ff92519e38dcb611133b"><div class="ttname"><a href="group__sm__config.html#gaf2bfc66d6427ff92519e38dcb611133b">sm_config_set_jmp_pin</a></div><div class="ttdeci">static void sm_config_set_jmp_pin(pio_sm_config *c, uint pin)</div><div class="ttdoc">Set the 'jmp' pin in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:620</div></div>
<div class="ttc" id="agroup__sm__config_html_gaf2d2a23b08ba74188160469b3fd09936"><div class="ttname"><a href="group__sm__config.html#gaf2d2a23b08ba74188160469b3fd09936">pio_get_default_sm_config</a></div><div class="ttdeci">static pio_sm_config pio_get_default_sm_config(void)</div><div class="ttdoc">Get the default state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:747</div></div>
<div class="ttc" id="agroup__sm__config_html_gaf3004bbd996443d0c841664ebc92905c"><div class="ttname"><a href="group__sm__config.html#gaf3004bbd996443d0c841664ebc92905c">sm_config_set_out_pins</a></div><div class="ttdeci">static void sm_config_set_out_pins(pio_sm_config *c, uint out_base, uint out_count)</div><div class="ttdoc">Set the 'out' pins in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:367</div></div>
<div class="ttc" id="agroup__sm__config_html_gaf543422206a8dbdc2efea85818dd650e"><div class="ttname"><a href="group__sm__config.html#gaf543422206a8dbdc2efea85818dd650e">sm_config_set_sideset</a></div><div class="ttdeci">static void sm_config_set_sideset(pio_sm_config *c, uint bit_count, bool optional, bool pindirs)</div><div class="ttdoc">Set the 'sideset' options in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:514</div></div>
<div class="ttc" id="agroup__sm__config_html_gafb753e8b35bbea9209ca4399a845f89c"><div class="ttname"><a href="group__sm__config.html#gafb753e8b35bbea9209ca4399a845f89c">sm_config_set_wrap</a></div><div class="ttdeci">static void sm_config_set_wrap(pio_sm_config *c, uint wrap_target, uint wrap)</div><div class="ttdoc">Set the wrap addresses in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:606</div></div>
<div class="ttc" id="agroup__sm__config_html_gafea1a06362182514518ebd91b2d52fd5"><div class="ttname"><a href="group__sm__config.html#gafea1a06362182514518ebd91b2d52fd5">sm_config_set_fifo_join</a></div><div class="ttdeci">static void sm_config_set_fifo_join(pio_sm_config *c, enum pio_fifo_join join)</div><div class="ttdoc">Setup the FIFO joining in a state machine configuration.</div><div class="ttdef"><b>Definition:</b> pio.h:674</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="astructpio__hw__t_html"><div class="ttname"><a href="structpio__hw__t.html">pio_hw_t</a></div><div class="ttdef"><b>Definition:</b> pio.h:132</div></div>
<div class="ttc" id="astructpio__program_html"><div class="ttname"><a href="structpio__program.html">pio_program</a></div><div class="ttdef"><b>Definition:</b> pio.h:890</div></div>
<div class="ttc" id="astructpio__sm__config_html"><div class="ttname"><a href="structpio__sm__config.html">pio_sm_config</a></div><div class="ttdoc">PIO Configuration structure.</div><div class="ttdef"><b>Definition:</b> pio.h:279</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>